1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | filetype on
filetype plugin on
set showmatch " show matching braces
set autowrite " save after :next and :make
set number " show line numbers
set nostartofline
set tabpagemax=50
"set scrolloff=10
set noexpandtab
"set expandtab " spaces instead tabs
"set cursorline
" indentation
"set shiftwidth=4
set tabstop=4 " change tab size
set autoindent
set colorcolumn=95 " view max width column
map <C-a> :tabp<CR>
map <C-d> :tabn<CR>
syntax on " enable color highlight
colorscheme ksyrx " change color scheme
" well... it's how ctrl+w, just ,+w
let mapleader=","
" fast saving
nmap <leader>w :w!<cr>
nmap <PageUp> <Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up><Up>
nmap <PageDown> <Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down><Down>
" remove all trailing whitespace
nmap <F5> :let _s=@/<bar>:%s/\s\+$//e<Bar>:let @/=_s<bar><cr>
" autocompletion enable/disable
nmap <F11> :AcpEnable
nmap <F12> :AcpDisable
let g:acp_enableAtStartup=0
let g:acp_behaviorKeywordLength=4
" show full path of file in tabs
"source mytabline.vim
"set tabline=%!MyTabLine()
" hide numbers column
nmap <F9> :set nonumber<cr>
nmap <F10> :set number<cr>
" if you want retab something file (put this inside vim command line)
" set ts=2 noet | retab! | set et ts=4 | retab
" auto completion
imap {<CR> {<CR><CR>}<UP><TAB>
"inoremap ( ()<left>
"inoremap { {}<left>
"inoremap \" \""<left> \" like that line below, just for double quote
" uncomment this removing \
"inoremap ' ''<left>
"inoremap [ []<left>
" faster mouse scrolling
set mouse=a
|
x
Notes
It’s rc i’m using. That’s all. :)