Created
May 16, 2015 23:30
-
-
Save phaberest/b0eab03e83db8fd7dc01 to your computer and use it in GitHub Desktop.
My vim config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" GENERALE | |
set backup " Permette i backup | |
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp | |
set backupskip=/tmp/*,/private/tmp/* | |
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp | |
set writebackup | |
call pathogen#infect() " use pathogen | |
"call pathogen#runtime_append_all_bundles() " use pathogen | |
colorscheme badwolf " https://github.com/sjl/badwolf/ | |
syntax enable " enable syntax processing | |
set tabstop=4 " number of visual spaces per TAB | |
set softtabstop=4 " number of spaces in tab when editing | |
set expandtab " tabs are spaces | |
" UI | |
set mouse=a " Impedisce la copia dei numeri in selezione | |
" Set this to the name of your terminal that supports mouse codes. | |
" Must be one of: xterm, xterm2, netterm, dec, jsbterm, pterm | |
set ttymouse=xterm2 | |
set number " show line numbers | |
set showcmd " show command in bottom bar | |
set cursorline " highlight current line | |
filetype indent on " load filetype-specific indent files | |
set wildmenu " visual autocomplete for command menu | |
" This is a pretty cool feature I didn't know Vim had. | |
" You know how Vim automatically autocompletes things | |
" like filenames when you, for instance, run :e ~/.vim<TAB> ? | |
" Well it will provide a graphical menu of all the matches | |
" you can cycle through if you turn on wildmenu. | |
set lazyredraw " redraw only when we need to. | |
set showmatch " highlight matching [{()}] | |
" SEARCH | |
set incsearch " search as characters are entered | |
set hlsearch " highlight matches | |
" turn off search highlight | |
nnoremap <leader><space> :nohlsearch<CR> | |
" MOVIMENTI | |
" move vertically by visual line | |
nnoremap j gj | |
nnoremap k gk | |
" move to beginning/end of line | |
nnoremap B ^ | |
nnoremap E $ | |
" $/^ doesn't do anything | |
nnoremap $ <nop> | |
nnoremap ^ <nop> | |
" highlight last inserted text | |
nnoremap gV `[v`] | |
" It visually selects the block of characters you added last | |
" time you were in INSERT mode. | |
let mapleader="," " leader is comma | |
" jk is escape (premuti contemporaneamente) | |
inoremap jk <esc> | |
" toggle gundo | |
nnoremap <leader>u :GundoToggle<CR> | |
" Serve gundo.vim https://github.com/sjl/gundo.vim.git |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment