Skip to content

Instantly share code, notes, and snippets.

@jarun jarun/vimrc
Last active Jun 21, 2017

What would you like to do?
.vimrc changes
set nu
set ai
set incsearch
set hlsearch
set expandtab
set ts=4
set shiftwidth=4
set ic
set cindent
set cursorline
set splitright
set bg=dark
setlocal spell spelllang=en_gb
set whichwrap+=<,>,h,l,[,]
set shell=/bin/bash
set backspace=indent,eol,start
"set mouse=a
set colorcolumn=81
"highlight chars beyond 80 lines in red
"highlight OverLength ctermbg=red ctermfg=white guibg=#592929
"match OverLength /\%81v.\+/
"auto-remove trailing whitepaces
autocmd BufWritePre * :%s/\s\+$//e
"format pasted text automatically
":nnoremap p ]p
":nnoremap <c-p> p
syntax enable
set hidden
"noremap <F8> <Esc>:syntax on<CR>
"inoremap <F8> <C-o>:syntax on<CR>
"allow saving of files as sudo when I forgot to start vim using sudo.
cmap w!! w !sudo tee > /dev/null %
set t_Co=256
colorscheme zenburn
"Transparent bg
hi Normal guibg=NONE ctermbg=NONE
autocmd BufEnter *.h,*.c colorscheme despacio
autocmd BufEnter *.h,*.c,Makefile* set noexpandtab
autocmd BufEnter *.h,*.c set ts=8
autocmd BufEnter *.h,*.c set shiftwidth=8
autocmd BufEnter *.py colorscheme gruvbox
autocmd BufEnter *.py set bg=dark
"Transparent bg
autocmd BufEnter *.h,*.c,*.py hi Normal guibg=NONE ctermbg=NONE
let Tlist_WinWidth = 10
let NERDTreeDirArrows=0
nmap <F7> :TrinityToggleTagList<CR>
nmap <F12> :TrinityToggleNERDTree<CR>
let g:LargeFile=8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.