Plugins and Plugin installation
perl-support-plugin
http://www.thegeekstuff.com/tag/vi-vim-tips-and-tricks/
This is very nice plugin, which gives you some handy shortcuts if you use frequently vim for perl editing .
The installation is pretty simple:
syntastic
This is very nice plugin for syntax checking of different languages.
Here some configuration options:
" Syntactis plugin configurations " --------------------------------- set statusline+=%#warningmsg# set statusline+=%{SyntasticStatuslineFlag()} set statusline+=%* let g:syntastic_always_populate_loc_list = 1 let g:syntastic_auto_loc_list = 1 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 "Syntastic Settings " https://github.com/scrooloose/syntastic " Perl related options let g:syntastic_enable_perl_checker=1 let g:syntastic_perl_checkers=['perl'] let g:syntastic_check_on_open=1 let g:syntastic_enable_balloons=1 let g:syntastic_always_populate_loc_list=1 let g:syntastic_echo_current_error=1 let g:syntastic_enable_highlighting=1 let g:syntastic_auto_jump=1 let g:syntastic_auto_loc_list=1 let g:syntastic_loc_list_height=5 "let g:syntastic_aggregate_errors=1 let g:syntastic_id_checkers=1 "Enable below in case you want the error line highlighted "Sytanstic Error Signs" let g:syntastic_enable_signs=1 "let g:syntastic_error_symbol="Error-->" "let g:syntastic_warning_symbol="Warning-->" " --------------------------------- " ---------------------------------
vim-plug
Very nice plugin for plugin installation/activation and so on
Prerequisties
Install ctags
yum / dnf / apt-get install ctags
installation
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
Then add the following to your vimrc (vim ~/.vimrc)
call plug#begin() " Auto-load tpop/vim-sensible Plug 'tpope/vim-sensible' " On-demand loading Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' } call plug#end()
Install the plugged plugins
vim :PlugInstall
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,…
Vim usefull shortcuts
Vim Split Manipulation
Ctrl + W or Ctrl + R – Swap the split screens
Ctrl + W T – break out the window to a tab
Using marks to save your current cursor position (something like bookmark)
Command | Description |
---|---|
ma |
set mark a at current cursor location |
'a |
jump to line of mark a (first non-blank character in line) |
`a |
jump to position (line and column) of mark a |
d'a |
delete from current line to line of mark a |
d`a |
delete from current cursor position to position of mark a |
c'a |
change text from current line to line of mark a |
|
Show auto-completion list |
y`a |
yank text to unnamed buffer from cursor to position of mark a |
:marks |
list all the current marks |
* |
Goto next find match OR mark the current word |
# |
Go to previous find match |
:sh |
Go to shell (then enter exit , to return in VIM) |
:marks aB |
list marks a, B |
More info on vim marks , here:
http://vim.wikia.com/wiki/Using_marks
http://mamchenkov.net/wordpress/2004/05/10/vim-for-perl-developers/
VIM External resources
https://www.freecodecamp.org/news/learn-linux-vim-basic-features-19134461ab85/