Skip to content

Instantly share code, notes, and snippets.

@lon9
Last active April 9, 2016 01:40
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 lon9/b0e78951d5faa84b35b8 to your computer and use it in GitHub Desktop.
Save lon9/b0e78951d5faa84b35b8 to your computer and use it in GitHub Desktop.
vim configuration
set number
set title
set ambiwidth=double
set tabstop=2
set expandtab
set shiftwidth=2
set hidden
set whichwrap=b,s,[,],<,>
set backspace=indent,eol,start
set nocompatible
set noswapfile
set wildmenu
set showcmd
set smartcase
set background=dark
set incsearch
set showmatch
set autoindent
set smartindent
set smarttab
augroup MyXML
autocmd!
autocmd Filetype xml inoremap <buffer> </ </<C-x><C-o>
autocmd Filetype html inoremap <buffer> </ </<C-x><C-o>
autocmd Filetype eruby inoremap <buffer> </ </<C-x><C-o>
augroup END
" Auto complete
set completeopt=menuone
for k in split("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_",'\zs')
exec "imap " . k . " " . k . "<C-N><C-P>"
endfor
imap <expr> <TAB> pumvisible() ? "\<Down>" : "\<Tab>" "
if has('vim_starting')
set runtimepath+=~/.vim/bundle/neobundle.vim
endif
call neobundle#begin(expand('~/.vim/bundle/'))
NeoBundleFetch 'Shougo/neobundle.vim'
NeoBundle 'scrooloose/syntastic'
NeoBundle 'scrooloose/nerdtree'
NeoBundle 'vim-scripts/AnsiEsc.vim'
NeoBundle 'Townk/vim-autoclose'
NeoBundle 'fatih/vim-go'
NeoBundle 'felixge/vim-nodejs-errorformat'
NeoBundleLazy 'tpope/vim-endwise', {
\ 'autoload' : { 'insert' : 1,}}
call neobundle#end()
filetype plugin indent on
NeoBundleCheck
if has('syntax')
syntax on
endif
if has("autocmd")
autocmd BufReadPost *
\ if line("'\'") > 0 && line("'\'") <= line("$") |
\ exe "normal! g'\"" |
\ endif
autocmd BufRead,BufNewFile *.cisco set filetype=cisco
endif
let g:syntastic_mode_map = { 'mode': 'passive',
\ 'active_filetypes': ['go', 'python', 'ruby', 'cpp', 'c'] }
let g:syntastic_go_checkers = ['go', 'golint']
let g:syntastic_python_checkers = ['python', 'pep8']
let g:syntastic_ruby_checkers = ['ruby', 'rubocop']
let g:syntastic_cpp_checkers = ['cpp', 'cpplint']
let g:syntastic_c_checkers = ['c', 'clang_check']
autocmd FileType python :inoremap # X#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment