" k1574's shitty vimrc. " Mouse. " In many terminal emulators the mouse works just fine. " By enabling it you can position the cursor, " Visually select and scroll with the mouse. if( has('mouse') ) set mouse=a endif " Set. set noswapfile set nowrap set number set autoindent set smartindent let g:python_recommended_style=1 imap set smarttab set noet ci pi sw=4 ts=4 set showcmd set showmatch set ignorecase set autowrite set hlsearch " List. set list set listchars=tab:\|\.,trail:. match NonText /\t/ " Folding. set foldenable set foldmethod=indent set foldnestmax=10 " GUI. set cursorline if has("gui_running") colorscheme vividchalk else " My colorscheme based on 'slate'. colorscheme jien "colorscheme torte endif " Syntax. syntax on " Backup. " set swapfile " set dir=~/tmp " Maps. " Folds. noremap <2-LeftMouse> za " Nerd-Tree. nmap \nt :NERDTree . " Commenting noremap / :Commentary " Disable highlight. nmap \nl :if &cursorline==1set nocursorlineelseset cursorlineendif nmap \nh :nohlsearch nmap i nmap >> nmap << nmap i nmap il imap imap " Windows. nmap l nmap h nmap j nmap k nmap v nmap s nmap + + nmap - - nmap 4> cnoremap cnoremap cnoremap cnoremap b cnoremap f vnoremap // y/\V=escape(@",'/\') " vimrc interaction. nnoremap confe :e $MYVIMRC nnoremap confr :source $MYVIMRC " File types. autocmd FileType javascript setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0 autocmd FileType javascriptreact setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0 autocmd FileType scss setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0 autocmd FileType css setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0 autocmd FileType html setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0 autocmd FileType htmldjango setlocal expandtab shiftwidth=2 tabstop=2 softtabstop=0 autocmd FileType python setlocal expandtab shiftwidth=4 tabstop=4 softtabstop=0 " Jump to the last pos. " When editing a file, always jump to the last known cursor position. " Don't do it when the position is invalid or when inside an event handler " (happens when dropping a file on "gvim"). " autocmd BufReadPost * " \ if line("'\"") > 0 && line("'\"") <= line("$") | " \ exe "normal g`\"" | " \ endif " Encoding. set encoding=utf-8