Vim: SnipMate Plugin: how i can change a .snippet and update it on the fly?
If you have the latest version of snipmate you can use the following command from vim to reload all the snippets :call ReloadAllSnippets() or better you can map it to a key
If you have the latest version of snipmate you can use the following command from vim to reload all the snippets :call ReloadAllSnippets() or better you can map it to a key
It’s hard to notice (I had to look twice), but the problem is the spaces between the patterns in the :autocmd definition: The syntax is :au[tocmd] [group] {event} {pat} [nested] {cmd} :help {pat} shows that there must not be whitespace between individual patterns. Example :au BufNewFile,BufRead *.py, *.php, *.rb, *.html, *.js, *.ts, *.md echomsg ‘test’ … Read more
Just press K. If you have set a global ‘keywordprg’, you need to unset it (or set it to the special :help value) in ~/.vim/after/ftplugin/vim.vim: :setlocal keywordprg=:help
The cterm in ctermbg is short for “color terminal”. It is used to define the background color when Vim runs in a terminal emulator and can only accept named colors like grey or cyan or color numbers like 7. Hexadecimal values only work in GVim/MacVim and must be used with guibg/guifg like that: hi Folded … Read more
You can add the following line to your ~/.ctags file. –python-kinds=-i to have ctags skip indexing import statements. To see what else you can enable/disable: ctags –list-kinds=python
If you are using tmux, that could be introducing a delay. Put this in your ~/.tmux.conf file: set -s escape-time 0
Something like this would work. Just create filetype autocmd that map <F4> or whatever you want to save and compile and run the program. It uses exec to build the string and uses shellescape to escape the file name. autocmd filetype python nnoremap <F4> :w <bar> exec ‘!python ‘.shellescape(‘%’)<CR> autocmd filetype c nnoremap <F4> :w … Read more
Absolutely! Go to File -> Settings -> External Tools and add a new one. Program and Working Directory fields should be self-explanatory. The parameter field should be $FilePath$. Click the Insert macro button to see more token values that you could use. You can also bind keyboard shortcuts to the external tools you define. See … Read more
% is the range over which the :s command (short for :substitute) will be run. % itself is short for the range :1,$, which means Line 1 to the last line in the buffer. The Vim help has a couple topics (user manual – :help 10.3, reference manual – :help cmdline-ranges) describing the forms that … Read more
Use the :g! command to delete every line that doesn’t match. :g!/ERROR/d