Skip to content

Instantly share code, notes, and snippets.

@rocky1138
Last active June 30, 2018 02:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rocky1138/2d5053854dc770581ef5 to your computer and use it in GitHub Desktop.
Save rocky1138/2d5053854dc770581ef5 to your computer and use it in GitHub Desktop.
.vimrc
set t_Co=256
syntax enable
set completeopt=longest,menuone
set encoding=utf8
set expandtab
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set smartindent
set number
filetype plugin on
" See http://vim.wikia.com/wiki/VimTip1386.
inoremap <expr> <CR> pumvisible() ? "\<C-y>" : "\<C-g>u\<CR>"
inoremap <expr> <C-n> pumvisible() ? '<C-n>' :
\ '<C-n><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
inoremap <expr> <M-,> pumvisible() ? '<C-n>' :
\ '<C-x><C-o><C-n><C-p><C-r>=pumvisible() ? "\<lt>Down>" : ""<CR>'
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd BufWritePre * :%s/\s\+$//e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment