Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin error - "Not an editor command: Javascript.vim" #58

Open
alexandermckay opened this issue May 4, 2019 · 4 comments
Open

Plugin error - "Not an editor command: Javascript.vim" #58

alexandermckay opened this issue May 4, 2019 · 4 comments
Labels
waiting for feedback Waiting for OP to comment on whether provided solution works or not.

Comments

@alexandermckay
Copy link

Screenshot (49)

I am experiencing the following error when I open file with vim-styled-components installed.

I am unsure what is causing an unable to find any further information that might explain why this error could be occurring.

@fleischie
Copy link
Collaborator

Hello and thanks for taking the time to file this issue.

From a quick glance I think this issue arises because the typescript.vim files giving an error are softlinks to the respective javascript.vim files. (The link files contain a path to their targets so that's why it raises a syntax error with javascript.vim not being a command). This might be because you are using bash on windows (I think), which I honestly have never considered to check.

Have you run vim/nvim natively in your windows environment before? It would be interestibg to see, if this problem persists. If you could elaborate on your setup a bit I might be able to try to reproduce the issue and find an appropriate fix for this.

✌️

@marcusrognes
Copy link

I get this error as well.
I use cmder and powershell.

My .vimrc file:

set number 
set encoding=utf-8
set history=500

" Enable filetype plugins
filetype plugin on
filetype indent on

" Set to auto read when a file is changed from the outside
set autoread

syntax on

set showmatch 

" Regex
set magic

" Use Unix as the standard file type
set ffs=unix,dos,mac

" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile

set shiftwidth=4
set tabstop=4

set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines

set backspace=2

set ruler

" Ignore compiled files
set wildignore=*.o,*~,*.pyc
if has("win16") || has("win32")
    set wildignore+=.git\*,.hg\*,.svn\*
else
    set wildignore+=*/.git/*,*/.hg/*,*/.svn/*,*/.DS_Store
endif


set nocompatible              " be iMproved, required
filetype off                  " required

" Specify a directory for plugins
set rtp+=$HOME/.vim/bundle/Vundle.vim/
call vundle#begin('$HOME/.vim/bundle/')

" Make sure you use single quotes
Plugin 'kien/ctrlp.vim'
Plugin 'scrooloose/nerdtree'

"Plugin 'valloric/youcompleteme'

Plugin 'ajh17/vimcompletesme'
Plugin 'ludovicchabant/vim-gutentags'
Plugin 'craigemery/vim-autotag'

Plugin 'mustache/vim-mustache-handlebars'
Plugin 'tpope/vim-fugitive'
Plugin 'majutsushi/tagbar'
Plugin 'tpope/vim-surround'
Plugin 'chiel92/vim-autoformat'
Plugin 'editorconfig/editorconfig-vim'
Plugin 'prettier/vim-prettier'
Plugin 'mattn/emmet-vim'

Plugin 'isruslan/vim-es6'
Plugin 'mxw/vim-jsx'

Plugin 'styled-components/vim-styled-components'
Plugin 'jparise/vim-graphql'

" Initialize plugin system
call vundle#end() 
filetype plugin indent on

let g:syntastic_javascript_checkers = ['eslint']
let g:syntastic_javascript_checkers = ['standard']

" JSX syntax
let g:jsx_ext_required = 0

"filetype plugin indent on NERDTree config
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif

autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | endif

map <C-n> :NERDTreeToggle<CR>

let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
let NERDTreeShowHidden=1

" tagbar config
nmap <C-m> :TagbarToggle<CR>



" CTRLP config
let g:ctrlp_custom_ignore = 'node_modules\|DS_Store\|git'

let g:mwDefaultHighlightingPalette = 'maximum'

@fleischie
Copy link
Collaborator

fleischie commented Jun 7, 2019

@alexandermckay @marcusrognes as I suspected the symlinks were not working on Windows. I tried to circumvent this by creating actual files using the runtime command.

I will give this a week or so. And otherwise close this issue. 👍

Edit: Feel free to test out the develop branch to see, if it works for you as well. (I wasn't able to test the new version on windows, yet.)

@fleischie fleischie added the waiting for feedback Waiting for OP to comment on whether provided solution works or not. label Oct 22, 2019
@stevematney
Copy link
Contributor

I was also seeing this issue while working on #80, which has been merged to the develop branch. I think I fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Waiting for OP to comment on whether provided solution works or not.
Projects
None yet
Development

No branches or pull requests

4 participants