Created
November 6, 2018 20:20
-
-
Save Shareed2k/be16b1d83da8ac6c96a1db1294c2ed3f to your computer and use it in GitHub Desktop.
my vim config example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set nocompatible " be iMproved, required | |
| set hlsearch | |
| set incsearch | |
| let NERDTreeMinimalUI = 1 | |
| let NERDTreeDirArrows = 1 | |
| let NERDTreeQuitOnOpen = 1 | |
| let NERDTreeAutoDeleteBuffer = 1 | |
| let g:auto_save = 1 | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| set number | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') | |
| Plugin 'VundleVim/Vundle.vim' | |
| Plugin 'morhetz/gruvbox' | |
| Plugin 'altercation/vim-colors-solarized' | |
| Plugin 'scrooloose/nerdtree' | |
| Plugin 'Xuyuanp/nerdtree-git-plugin' | |
| Plugin 'vim-airline/vim-airline' | |
| Plugin '907th/vim-auto-save' | |
| Plugin 'Valloric/YouCompleteMe' | |
| Plugin 'jiangmiao/auto-pairs' | |
| " All of your Plugins must be added before the following line | |
| call vundle#end() " required | |
| filetype plugin indent on " required | |
| " To ignore plugin indent changes, instead use: | |
| "filetype plugin on | |
| autocmd StdinReadPre * let s:std_in=1 | |
| autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif | |
| autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif | |
| nmap <F6> :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> | |
| " nmap <Leader>f :NERDTreeToggle<Enter> | |
| nnoremap <silent> <Leader>v :NERDTreeFind<CR> | |
| colorscheme gruvbox | |
| syntax enable | |
| set background=dark | |
| let g:solarized_termcolors=256 | |
| " colorscheme solarize | |
| 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