From 5b132bf1244a008ad3ce67688030a7678831f77d Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Fri, 23 Oct 2015 03:14:36 -0300 Subject: Initial commit --- vimrc | 117 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 117 insertions(+) create mode 100644 vimrc (limited to 'vimrc') diff --git a/vimrc b/vimrc new file mode 100644 index 0000000..d351918 --- /dev/null +++ b/vimrc @@ -0,0 +1,117 @@ +filetype plugin indent on +syntax on + +set runtimepath+=/usr/share/vim/vimfiles/ + +call pathogen#infect() + +" Color +"let g:hybrid_use_Xresources = 1 + +if has("gui_running") + set guioptions=c + colo gruvbox + set bg=dark + set guifont=Envy\ Code\ R\ 9 +else + set bg=light +endif + +" Settings +set noerrorbells +set novisualbell + +set showcmd +set autoread + +set nobackup +set nowb +set noswapfile +set wrap +set scrolloff=3 +set autochdir + +if expand("%:p") =~ '\.*blender\.*' + set tabstop=4 + set shiftwidth=4 + set smarttab + set autoindent + set smartindent + set ci + set cin + set ofu=syntaxcomplete#Complete + set showmatch + set incsearch +else + set expandtab + set smarttab + set sw=4 + set ts=4 + set sts=4 + set ai + set si +endif + +let NERDTreeIgnore=['.pyc$'] + +" Filetyp dependent + +au BufRead /tmp/mutt-* set tw=80 +au BufRead,BufNewFile *.md set tw=80 ft=markdown +au Bufread,BufNewFile *.go set ft=go + +au Bufread,BufNewFile *.oz set ft=oz + +au Bufread,BufNewFile *.rb set sw=2 ts=2 sts=2 + +au BufRead,BufNewFile *.html call HtmlDjangoSettings() + +function! HtmlDjangoSettings() + if (&ft=='htmldjango') + inoremap t {% %}hhi + inoremap s {{ }}hhi + endif +endfunction + +" Some functions +set colorcolumn=0 +function! Toggle_colorcolumn() + if &colorcolumn == 0 + set colorcolumn=80 + else + set colorcolumn=0 + endif +endfunction + + +""""" Mappings """""" +" Setting nop to the arrows keys +nmap +map +map +map +map +imap +imap +imap +imap + +nnoremap :NERDTreeToggle +nmap :TagbarToggle + +map h +map j +map k +map l + +" Yank behaves really good +map Y y$ + +" Nice for wrapped lines +nnoremap j gj +nnoremap k gk +inoremap jk + +nnoremap p :call Toggle_colorcolumn() +" Diff +nnoremap :diffg 3 -- cgit v1.2.3-70-g09d2