···11"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
22-" Maintainer:
22+" Maintainer:
33" Amir Salihefendic — @amix3k
44"
55" Awesome_version:
···4848" Fast saving
4949nmap <leader>w :w!<cr>
50505151-" :W sudo saves the file
5151+" :W sudo saves the file
5252" (useful for handling the permission-denied error)
5353command! W execute 'w !sudo tee % > /dev/null' <bar> edit!
5454···6060set so=7
61616262" Avoid garbled characters in Chinese language windows OS
6363-let $LANG='en'
6363+let $LANG='en'
6464set langmenu=en
6565source $VIMRUNTIME/delmenu.vim
6666source $VIMRUNTIME/menu.vim
···9292" Ignore case when searching
9393set ignorecase
94949595-" When searching try to be smart about cases
9595+" When searching try to be smart about cases
9696set smartcase
97979898" Highlight search results
9999set hlsearch
100100101101" Makes search act like search in modern browsers
102102-set incsearch
102102+set incsearch
103103104104" Don't redraw while executing macros (good performance config)
105105-set lazyredraw
105105+set lazyredraw
106106107107" For regular expressions turn magic on
108108set magic
109109110110" Show matching brackets when text indicator is over them
111111-set showmatch
111111+set showmatch
112112" How many tenths of a second to blink when matching brackets
113113set mat=2
114114···132132" => Colors and Fonts
133133"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
134134" Enable syntax highlighting
135135-syntax enable
135135+syntax enable
136136137137" Enable 256 colors palette in Gnome Terminal
138138if $COLORTERM == 'gnome-terminal'
···230230map <leader>tn :tabnew<cr>
231231map <leader>to :tabonly<cr>
232232map <leader>tc :tabclose<cr>
233233-map <leader>tm :tabmove
234234-map <leader>t<leader> :tabnext
233233+map <leader>tm :tabmove
234234+map <leader>t<leader> :tabnext
235235236236" Let 'tl' toggle between this and the last accessed tab
237237let g:lasttab = 1
···246246" Switch CWD to the directory of the open buffer
247247map <leader>cd :cd %:p:h<cr>:pwd<cr>
248248249249-" Specify the behavior when switching between buffers
249249+" Specify the behavior when switching between buffers
250250try
251251 set switchbuf=useopen,usetab,newtab
252252 set stal=2
···363363364364function! CmdLine(str)
365365 call feedkeys(":" . a:str)
366366-endfunction
366366+endfunction
367367368368function! VisualSelection(direction, extra_filter) range
369369 let l:saved_reg = @"
···413413autocmd BufWritePost,FileWritePost *.age silent u
414414autocmd BufWritePost,FileWritePost *.age set nobin
415415augroup END
416416+417417+nnoremap 9 :let _s=@/<Bar>:%s/\s\+$//e<Bar>:let @/=_s<Bar><CR>