Skip to content

Instantly share code, notes, and snippets.

@becxer
Last active October 22, 2015 17:17
Show Gist options
  • Select an option

  • Save becxer/cf0509053ed4c21d4874 to your computer and use it in GitHub Desktop.

Select an option

Save becxer/cf0509053ed4c21d4874 to your computer and use it in GitHub Desktop.
.vimrc (no plugin)
"
" becxer's vim options
"
" @ author becxer
" @ email [email protected]
"
"Customize toggle shortcut
noremap <c-f> :tabNext<cr>
noremap <c-n> :set invnumber<cr> :set list!<cr>
noremap <c-p> :set paste!<cr>
"file & encoding
set encoding=utf-8 " set read encoding to utf-8
set fileencoding=utf-8 " set write encoding to utf-8
set autowrite " auto write when moved cursor
set autoread " auto read when file changed
set noswapfile " set no create swapfile
"edit option & indent
set nu " set line number
set showmatch " highlight match brace
set smartindent cinwords=if,elif,else,for,while,try,except,finally,def,class "indent nextline keywords"
set nocindent " no auto indent like c,c++,java style
set listchars=tab:>-,trail:.,extends:>,precedes:<,eol:$ "set space,tab to char
set list "set listchars above
colorscheme ron " set color scheme
"searching keyword
set hlsearch " highlight searching keywords
"tab setting
set tabstop=8 " set real tab to space 8
set softtabstop=4 " set keystroke tab to space 4
set shiftwidth=4 " set <, > key to space 4
set expandtab " always convert tab to space
"setup below status line
set laststatus=2
set statusline=%F\ %m%h%r%<%=\ [%{&ff},%{&fenc}]\ [%Y]\ [%l,%v]\ [%L]\[%p%%]
au InsertEnter * hi StatusLine ctermfg=Green guifg=Green
au InsertLeave * hi StatusLine ctermfg=Yellow guifg=Yellow
" locate your cursor to last modified
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g`\"" |
\ endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment