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...(-‸ლ)
Related
I am using a vim/nvim plugin asyncrun that enables an API call that works fine in nvim if I implement it in ~/.config/nvim/init.vim using a line:
call asyncrun#run("", "cwd", "firefox")
Now this same line does not work for vim if I try to use it inside ~/.vimrc. I always get a warning:
Unknown finction: asyncrun#run
What needs to be changed in order for this to also work for vim?
Following the #doopNudles comment I also clarify that vim plugin is manually installed in the folder ~/.vim/pack/my-plugins/start/vim-asyncrun/asyncrun.vim/plugin/asyncrun.vim. I install all my vim plugins the same way (using the vim v8 native ability to detect plugins).
The problem was that ~/.vim/pack/my-plugins/start/vim-asyncrun/asyncrun.vim/plugin/asyncrun.vim has one extra folder!
It works if I delete the extra folder asyncrun.vim like this ~/.vim/pack/my-plugins/start/vim-asyncrun/plugin/asyncrun.vim
Every time I write a new python source code *.py, the following error message comes up:
Error detected while processing BufRead Auto commands for"*.py":
E518:Unknow option:set
E28:No such highlight group name: BadWhitespace
How can I fix it?
Before I typed this question , I modified my _vimrc file according to this post, but the error message remains. Even worse another error message occurs as well:
The ycmd server SHUT DOWN(restart with':YcmRestartSever').YCM core library not detected;you need to compile YCM before using it. Follow the instructions in the documentation.
I am a new Gvim user and I use gVim 8.0 in Windows 10. I set up my python development environment by searching the Internet and I installed the YouCompleteMe plugin via Vundle but It is too difficult for me to compile YCM myself now.
for error like
Error detected while processing BufRead Auto commands for"*.py":
E518:Unknow option:set
E28:No such highlight group name: BadWhitespace
add | to end of set xxx
au BufNewFile,BufRead *.js,*.html,*.css,*.vue
\ set tabstop=2 |
\ set softtabstop=2 |
\ set shiftwidth=2
set
"Flagging Unnecessary Whitespace
highlight BadWhitespace ctermbg=red guibg=darkred
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h match BadWhitespace /\s\+$/
YCM depends on ycmd to do actual work. ycmd is a compiled service running in the background so you have to compile it to make it work.
The basic installation procedure consists of opening a shell / command line for your OS, cd-ing to YouCompleteMe's vim plugin directory and running ./install.py there to compile it. If you need it for languages other than Python, run ./install.py --help and look up any additional flags you need to add to turn on support for the languages you want to use.
The above assumes you have read YCM's installation guide and have installed the required dependencies. There are two guides relevant to your case and they are rather detailed and clearly written:
Windows installation guide (provided on a best-case basis)
Full installation guide (to resolve any problems if the former doesn't work)
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.
I can't get Syntastic to work for JavaScript files in MacVim. If I save a file with errors in it, nothing is displayed: there is no error margin.
If I run :SyntasticInfo, then I see:
Syntastic info for filetype: javascript
Available checkers: jshint
Currently active checker(s): jshint
If I run jshint directly, using :!jshint %, then I see the errors I expect.
I had a custom syntastic_javascript_jshint_conf setting:
let g:syntastic_javascript_jshint_conf="~/.jshintrc"
...and the ~/.jshintrc file was missing. Recreating it fixed the problem, and now I get the error margin.
Updated to add: I've added a feature to my .vimrc, so that it tracks the "nearest" .jshintrc file: https://github.com/rlipscombe/vimrc/blob/master/vimrc#L176
i tried to use this python compiler plugin to be able to "compile" a py script and see the errors in qucikfix windows and jump directly to the linenumers.
http://www.vim.org/scripts/script.php?script_id=1439
i placed it in /compiler/python.vim
but: the script is not loaded when i open a python file. even :filetype detect doesnt help.
(according to :scriptnames)
i also tried to put the stuff into _vimrc. but it is overwritten by some other stuff thats useless. i dont know where it comes from i searched all plugin directories but there is no plugin that does set makeprg and errorformat!
im lost. plz help.
thanks!
Compiler-plugins are never loaded automatically. You'll have to load it explicitly with :compiler python.
you could add this to your filetype.vim file:
autocmd! BufRead,BufNewFile *.py compiler python