" Limit what can be done in the VIMRC set secure " Disable syntax for now syntax off set background=dark set t_Co=0 " Set filetype detection on, so that Git and other systems have autowrap filetype indent plugin on " Set utf8 as standard encoding and en_US as the standard language set encoding=utf8 " Use Unix as the standard file type set ffs=unix,dos,mac set colorcolumn=250 "Disable formatting past 250 chars " Turn backup off, since most stuff is in SVN, git etc. anyway... set nobackup set nowb set noswapfile set shortmess+=I " 1 tab == 8 spaces set shiftwidth=8 set tabstop=8 set textwidth=120 set expandtab " Tabs to spaces " Linebreak on textwidth characters set lbr set ai "Auto indent set si "Smart indent set wrap "Wrap lines set shiftround " When shifting lines, round indentation to nearest shiftwidth " Sets how many lines of history VIM has to remember set history=100 " Set to auto read when a file is changed from the outside set autoread au FocusGained,BufEnter * checktime " Set text-wrap to 72 chars autocmd FileType text setlocal textwidth=72 autocmd FileType markdown setlocal textwidth=72 " Set 7 lines to the cursor - when moving vertically using j/k set so=7 " Avoid garbled characters in Chinese language windows OS let $LANG='en' set langmenu=en "Always show current position set ruler " Height of the command bar set cmdheight=1 " A buffer becomes hidden when it is abandoned set hid " Configure backspace so it acts as it should act set backspace=eol,start,indent set whichwrap+=<,>,h,l " Ignore case when searching set ignorecase " When searching try to be smart about cases set smartcase " Highlight search results set hlsearch " Makes search act like search in modern browsers set incsearch " Don't redraw while executing macros (good performance config) set lazyredraw " For regular expressions turn magic on set magic " No annoying sound on errors set noerrorbells set novisualbell set t_vb= set tm=500 " time waited for key press(es) to complete. It makes for a faster key response set ttyfast set ttimeout set ttimeoutlen=50 " Properly disable sound on errors on MacVim if has("gui_macvim") autocmd GUIEnter * set vb t_vb= endif " Add a bit extra margin to the left set foldcolumn=1 " new splits will be at the bottom or to the right side of the screen set splitbelow set splitright set showcmd " Show previous commands set showmode " Display NORMAL/INSERT/VISUAL mode below statusline set number " We like line numbers " Always show the status line set laststatus=2 " Statusline definition set statusline= set statusline+=%7*\[%n] "buffernr set statusline+=%1*\ %<%t\ "File+path set statusline+=%3*\ %y\ "FileType set statusline+=%4*\ %{''.(&fenc!=''?&fenc:&enc).''} "Encoding set statusline+=%5*\ %{(&bomb?\",BOM\":\"\")}\ "Encoding2 set statusline+=%6*\ %{&ff}\ "FileFormat (dos/unix..) set statusline+=%7*\ %=\ row:%l/%L\ (%03p%%)\ "Rownumber/total (%) set statusline+=%9*\ col:%03c\ "Colnr set statusline+=%0*\ %m%r%w\ "Modified? Readonly? Top/bot. " Remove the Windows ^M - when the encodings gets messed up noremap m mmHmt:%s///ge'tzt'm " Toggle paste mode on and off map pp :setlocal paste! "set pastetoggle= " Disable mouse automatic mode set mouse-=a " Enable line numbers toggle noremap n :set invnumber " Trim whitespace at end of lines nnoremap s :%s/\s\+$//e " Fix weird JSON quotation issue let g:vim_json_syntax_conceal = 0 " Look for ctags files set tags=tags