Vim Plugin
Vim Plugin
formatting, they should follow a proper coding standards and styles before commit
their code in any version control system. Today we are going to see how we can
simplify this process by adding plugin to the most famous vim editor.
vim
To install git:
After installing the above prerequisite, following are the step by step
instructions to install vim plugin,
Clone git plugin repository
Adding contents to .vimrc file
Plugin Installation
Verification
Clone git plugin repository:
Simple, you just need to clone some existing plugin packages. Here I am sharing one
of the famous plugin manager "Vundle" which is a short form for Vim bundle
call togglebg#map("<F5>")
Plugin 'scrooloose/nerdtree'
let NERDTreeIgnore=['\.pyc$', '\~$'] "ignore files in NERDTree
Plugin 'kien/ctrlp.vim'
"set nu
Plugin 'Lokaltog/powerline', {'rtp': 'powerline/bindings/vim/'}
set clipboard=unnamed
Plugin 'jistr/vim-nerdtree-tabs'
let NERDTreeIgnore=['\.pyc$', '\~$']
map <C-n> :NERDTreeToggle<CR>
let g:ctrlp_map = '<c-p>'
" copy and paste
vmap <C-c> "+yi
vmap <C-x> "+c
vmap <C-w> c<ESC>"+p
imap <C-w> <ESC>"+pa
Plugin 'leshill/vim-json'
autocmd FileType python map <buffer> <F3> :call Flake8()<CR>
"Plugin 'reedes/vim-lexical'
"let g:lexical#spellfile = ['~/.vim/spell/en.utf-8.add',]
"let g:lexical#spelllang = ['en_us',]
"augroup lexical
" autocmd!
" autocmd FileType markdown,mkd call lexical#init()
" autocmd FileType textile call lexical#init()
" autocmd FileType python call lexical#init({ 'spell': 1 })
"augroup END
"
"Plugin 'Valloric/YouCompleteMe'
Plugin Installation
Login into your linux machine terminal and type
vim
After entering into vim type
:PluginInstall
PluginInstall will take care of installing all the plugins we mentioned in
the .vimrc file, once all the plugins are installed just type :q to exit from the
buffer window
:q
Verification
Just to make sure that everything works fine, open your vim editor and start
writing your code and you could see that your plugin installation and its features
are working fine as expected.
Cheers.