It's been quite some time that I'm facing this annoying problem with syntastic.
When running gvim and performing a SyntasticInfo c, without opening anything, it returns me :
Syntastic version: 3.5.0-72
Info for filetype: c
Mode: active
Filetype c is active
Available checkers: clang_check gcc make
Currently enabled checker: clang_check
But as soon as I open a c file and do a SyntasticInfo I get:
Syntastic version: 3.5.0-72
Info for filetype: c
Mode: active
Passive filetype: c
Filetype c is passive
Available checkers: clang_check gcc make
Currently enabled checker: clang_check
As a result nothing is checked.
Here is what is in my vimrc :
let g:syntastic_check_on_open = 1
let g:syntastic_c_checkers = ['clang_check']
let g:syntastic_c_clang_post_args = ""
let g:syntastic_mode_map={"mode":"active", "active_filetypes": [], "passive_filetypes": []}
[Edit]
Having tried to put 'c' for active_filetypes, it doesn't change anything. Though, what is really weird, is that the active checking is not triggered if I don't do a :so ~/.vimrc and every time I open gvim. It's as if this option wasn't taken into account by gvim.
[/Edit]
Thank you in advance for any help
You probably have Eclim installed. Eclim silently disables syntastic for the filetypes it can handle. Recent versions of syntastic warn you when this situation is detected.
Related
I use NERDTree as a file explorer and after using its Menu, Vim does not return to its original size, see screenshots below.
Using NERDTree Menu:
After using the Menu:
The editor returns to normal only if I resize the terminal window.
My system config
Vim-GTK3 9.0
Terminal: Konsole
Debian 11
NERDTree Config
nmap <Leader>nt :NERDTreeFind<CR>
let NERDTreeQuitOnOpen=1
let NERDTreeShowHidden=1
let g:NERDTreeDirArrowExpandable = '▸'
let g:NERDTreeDirArrowCollapsible = '▾'
let g:NERDTreeIgnore = ['^node_modules$']
I have a same issue and I have remove vim v9 and install from source last v8 and it's work!
I don't know what is happen in 9 version vim with the bottom pane, but I have observe that vim v8 on my remote server have a perfect working.
UPD:
And I founded issue on the NERDTree repo with the issue:
https://github.com/preservim/nerdtree/issues/1321
You can set cmdheight to 2 to solve the problem.
Add the following line into your .vimrc
set cmdheight=2
This is caused by an incompatibility between NERDTree and Vim 9.0.
You can fix it by applying this hotfix to your local copy of NERDTree.
Some alternatives:
Add let g:NERDTreeMinimalMenu=1 to your .vimrc to set menu to display in a single line
Use a version of Vim earlier than the 9.0 release
See issue #1321 in the NERDTree repo for more info.
This problem remains relevant. To restore the window size, you can try these shortcuts:
Ctrl+w _
Ctrl+w |
Ctrl+w =
Source: https://vim.fandom.com/wiki/Resize_splits_more_quickly
I'm new in vim, and i've just installed syntastic, my question is how to activate syntastic to check htmldjango type, i have installed pylint and pylint-django, this is my SyntasticInfo
Syntastic version: 3.8.0-3 (Vim 800, Linux, GUI)
Info for filetype: htmldjango
Global mode: active
Filetype htmldjango is active
The current file will be checked automatically
Available checkers: -
Currently enabled checkers: -
Thankyou
There are two reasons this isn't working. First, to get pylint-django to "attempt" to check an htmldjango file, you'd have to insert this into your .vimrc file:
let g:syntastic_python_pylint_args = "--load-plugins pylint_django"
let g:syntastic_htmldjango_checkers = ['python/pylint']
Note that you have to specify 'python/pylint' as the checker as this is a foreign checker to the htmldjango filetype.
That will fix your SyntasticInfo issue:
Currently enabled checker: python/pylint
HOWEVER, currently python-pylint doesn't support djangohtml templates at all so even once you've done this you'll be disappointed and get all kinds of syntax errors...because the checker only supports django model and view filetypes...(-‸ლ)
I installed Python-mode as a plugin in my .vimrc:
Plugin 'klen/python-mode'
It got installed fine, but I had the breakpoint set to my <leader>b like this:
" Enable breakpoints plugin
let g:pymode_breakpoint = 1
let g:pymode_breakpoint_key = '<leader>b'
I then wanted to change the '<leader>b' to '<leader>k', but when I make the change, I still get the breakpoint when I hit leader-b and nothing when I do leader-k.
I've tried running PluginInstall, restarting Vim, and restarting my terminal. How do I get Vim to recognize this change to the .vimrc?
That's because g:pymode_breakpoint_key is not the name of the option. According to the pymode docs, the option is g:pymode_breakpoint_bind. So the below should work:
let g:pymode_breakpoint_bind = '<leader>k'
I've installed Syntastic with Pathogen, and tried just about all I can think of to get Syntastic to recognize my pylint checker.
Pylint checker is installed here
/home/myself/.local/bin/pylint
I echoed my path and
/home/myself/.local/bin
is indeed in the $PATH variable.
My .vimrc looks like this
set tabstop=4
execute pathogen#infect()
syntax on
filetype plugin indent on
let g:syntastic_mode_map = { 'mode': 'passive',
\ 'active_filetypes': ['python'],
\ 'passive_filetypes': ['perl'] }
let g:syntastic_python_checkers = ['pylint', 'python']
and yet when I run the command
SyntasticInfo
inside vim, I still see
Syntastic: passive mode enabled
Syntastic version: 3.4.0-79
Info for filetype:
Available checker(s):
Currently enabled checker(s):
Spent a good while searching google for this, does anyone have a clue as to what I have forgotten?
EDIT/ANSWER:
In case anyone else needs help with something like this, doing
:setfiletype python
appeared to get things right.
Had similar issues with the filetype plugins, weirdly but this helped:
filetype off " <<< this line
filetype plugin indent on
syntax on
I use the same .vimrc file on lots of systems. I'd like to bypass vundle installing some modules that I know won't work if 'if_lua' is not present.
Is there a vim script way of conditionally doing
Bundle 'Shougo/neocomplete.vim'
only if vim was compiled with lua to avoid the start up error:
$ vim myprogram.c
neocomplete does not work this version of Vim.
It requires Vim 7.3.885 or above and "if_lua" enabled Vim.
Press ENTER or type command to continue
thx
if has('lua')
Bundle 'Shougo/neocomplete.vim'
end