Skip to content

Instantly share code, notes, and snippets.

@romanitalian
Last active May 31, 2020 19:51
Show Gist options
  • Save romanitalian/2d27c19ec9479c89ae4d259e8d88a94a to your computer and use it in GitHub Desktop.
Save romanitalian/2d27c19ec9479c89ae4d259e8d88a94a to your computer and use it in GitHub Desktop.
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', {'on': 'NERDTreeToggle'}
" color schema
Plug 'morhetz/gruvbox'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'jiangmiao/auto-pairs'
Plug 'airblade/vim-gitgutter'
"Plug 'bling/vim-airline'
Plug 'vim-airline/vim-airline-themes'
call plug#end()
syntax on
colorscheme gruvbox
set background=dark
set number
" set expandtab
" set tabstop=2
set hlsearch
set incsearch
set nu
set number
let g:airline_theme='simple'
map <C-n> :NERDTreeToggle<CR>
map <silent> <C-h> :call WinMove('h')<CR>
map <silent> <C-j> :call WinMove('j')<CR>
map <silent> <C-k> :call WinMove('k')<CR>
map <silent> <C-l> :call WinMove('l')<CR>
function! WinMove(key)
let t:curwin = winnr()
exec "wincmd ".a:key
if (t:curwin == winnr())
if (match(a:key,'[jk]'))
wincmd v
else
wincmd s
endif
exec "wincmd ".a:key
endif
endfunction
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment