Skip to content

Instantly share code, notes, and snippets.

@caiwan
Created September 21, 2017 08:05
Show Gist options
  • Save caiwan/3cb69d2a29ad00e0d5fa408f3d343286 to your computer and use it in GitHub Desktop.
Save caiwan/3cb69d2a29ad00e0d5fa408f3d343286 to your computer and use it in GitHub Desktop.
My own vimrc file to make vim more comortable
set encoding=utf-8
set fileencoding=utf-8
filetype plugin indent on
syntax on
set smartindent
set expandtab
set ignorecase
set smartcase
set shiftwidth=4
set tabstop=4
set hlsearch
set ruler
set autowrite
set autoread
set nofoldenable
set number
set pastetoggle=<F2>
augroup vimrc_autocmds_python
autocmd!
" highlight characters past column 120
autocmd FileType python highlight Excess ctermbg=DarkGrey guibg=Black
autocmd FileType python nnoremap <buffer> <F5> :exec '!python' shellescape(@%, 1)<cr>
" autocmd FileType python match Excess /\%150v.*/
autocmd FileType python set nowrap
autocmd FileType python set colorcolumn=12
augroup END
autocmd Filetype javascript setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
autocmd Filetype html setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
autocmd Filetype coffee setlocal expandtab tabstop=2 shiftwidth=2 softtabstop=2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment