Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Adding new settings to the vim config (pilaging from @stevelosh)

  • Loading branch information...
commit 9e194219b026825ccd55e0ddfb81252ae5d7b564 1 parent 9188dfd
@roman authored
2  bundle/syntastic
@@ -1 +1 @@
-Subproject commit 88dbca87c80de9b7852672907f6fc9fb935f531c
+Subproject commit d3317aefdc540d06451b3b33303a290c40942cb2
View
4 modules/backup.vim
@@ -0,0 +1,4 @@
+set undodir=~/.vim/tmp/undo//
+set backupdir=~/.vim/tmp/backup//
+set directory=~/.vim/tmp/swap//
+set backup
View
6 modules/general.vim
@@ -71,10 +71,10 @@ set textwidth=79
" A bunch of settings all wrapped up together
" :help formatoptions for more info
set formatoptions=qrnl
-" We want the line to be colored after passing 85
+" We want the line to be colored after passing 79
" chars, this way we know we are breaking formatting
" rules
-"set colorcolumn=85
+set colorcolumn=+1
" We want elements to be foldable by their syntax
" this way is more likely to work out of the box
@@ -127,5 +127,3 @@ nnoremap <LEADER>a :<C-u>new<CR>
nnoremap ;; q:
nmap q: <nop>
-" Highlight long lines
-match ErrorMsg '\%80v.\+'
View
7 modules/highlights.vim
@@ -0,0 +1,7 @@
+" Highlight long lines
+match Error '\%80c'
+match ErrorMsg '^\(<\|=\|>\)\{7\}\([^=].\+\)\?$'
+
+" Show WarningMsg as errors
+hi! link Error WarningMsg
+hi! link ColorColumn StatusLine
View
22 modules/quickfix.vim
@@ -3,31 +3,17 @@ nmap <LEADER>b :<C-u>make<CR>
au FileType qf nnoremap <silent><buffer> q :<C-u>cclose<CR>
au QuickFixCmdPost make call OpenQuickFixBuffer()
-" NOTE: Refactor this to uses signs instead
-" Depends on MarkLines in order to work
-" see:
-" * modules/marklines.vim
-" * :help marklines
-"function! HighlightQuickFixLines(qflist)
-" if exists('g:marklines_loaded') && !empty(a:qflist)
-" let l:curPos = getpos('.')
-" " We save the cursor position
-" for qferror in a:qflist
-" exec qferror.lnum . 'MarkLinesOn'
-" endfor
-" " we keep the cursor in the same place
-" call setpos('.', l:curPos)
-" endif
-"endfunction
+nnoremap ∆ :<C-u>cnext<cr>zvzz
+nnoremap ˚ :<C-u>cprev<cr>zvzz
+inoremap<ESC>:cnext<cr>zvzz
+inoremap ˚ <ESC>:cprev<cr>zvzz
function! OpenQuickFixBuffer()
" #NOTE: Remove all signs
- "%MarkLinesOff
let l:qflist = getqflist()
if !empty(l:qflist)
call RemoveFromStatusLine('%#error#\[Make failed\]%\*')
call AppendToStatusLine('%#error#\[Compile Error\]%\*')
- " call HighlightQuickFixLines(l:qflist)
copen
elseif v:shell_error > 0
View
11 modules/search.vim
@@ -17,6 +17,17 @@ set incsearch
set showmatch
set hlsearch
+" Ack for the last search.
+nnoremap <silent> <leader>? :execute "Ack! '" . substitute(substitute(substitute(@/, "\\\\<", "\\\\b", ""), "\\\\>", "\\\\b", ""), "\\\\v", "", "") . "'"<CR>
+"
+" Open a Quickfix window for the last search.
+nnoremap <silent> <leader>/ :execute 'vimgrep /'.@/.'/g %'<CR>:copen<CR>
+
+" Make the search always centered, and also open sufficient folds
+" when going to a match
+nnoremap n nzzzv
+nnoremap N Nzzzv
+
nnoremap <silent> <LEADER><SPACE> :noh<CR>
nnoremap <TAB> %
vnoremap <TAB> %
View
3  modules/tabs.vim
@@ -66,7 +66,8 @@ nnoremap <silent> <F5> :call <SID>StripTrailingWhitespaces()<CR>
" ==
" == Invisible keys customization
" Use the same symbols as TextMate for tabstops and EOLs
-set listchars=tab:\ ,eol:¬
+set listchars=tab:\ ,eol:¬,extends:❯,precedes:
+set showbreak=↪
" Shortcut to rapidly toggle `set list`
nmap <leader>l :set list!<CR>
View
48 modules/tpp.vim
@@ -1,48 +0,0 @@
-au FileType tpp :call LoadTPP()
-au FileType int-tpp :call LoadTPPPresentation()
-
-function! LoadTPP()
- nmap <silent> <LEADER>r :call RunTPP()<CR>
-endfunction!
-
-function! RunTPP()
- let l:currentFile = expand('%')
- let l:args = 'tpp ' . l:currentFile
- call vimshell#execute_internal_command(
- \ 'iexe', vimproc#parser#split_args(l:args), { 'stdin' : '', 'stdout' : '', 'stderr' : '' },
- \ { 'is_interactive' : 0, 'is_single_command' : 1 })
- let b:interactive.is_close_immediately = 1
-endfunction
-
-function! LoadTPPPresentation()
- setl nonu
- nmap <buffer> <silent> <left> :call TPPPrevSlide()<CR>
- imap <buffer> <silent> <left> <ESC>:call TPPPrevSlide()<CR>
- nmap <buffer> <silent> <right> :call TPPNextSlide()<CR>
- imap <buffer> <silent> <right> <ESC>:call TPPNextSlide()<CR>
- nmap <buffer> <silent> q :call TPPQuitSlide()<CR>
- imap <buffer> <silent> q <ESC>:call TPPQuitSlide()<CR>
-endfunction
-
-function! TPPNextSlide()
- "try
- call vimshell#interactive#send_string(" ")
- "catch
- "endtry
-endfunction
-
-function! TPPPrevSlide()
- "try
- call vimshell#interactive#send_string("b")
- "catch
- "endtry
-endfunction
-
-function! TPPQuitSlide()
- "try
- call vimshell#interactive#send_string("q")
- "catch
- "endtry
-endfunction
-
-
View
7 vimrc
@@ -1,3 +1,4 @@
+
" == Initial Setup (Pathogen)
filetype off
call pathogen#runtime_append_all_bundles()
@@ -11,6 +12,10 @@ source ~/.vim/modules/general.vim
source ~/.vim/modules/statusline.vim
" == Search module
source ~/.vim/modules/search.vim
+" == Backup module settings
+source ~/.vim/modules/backup.vim
+" == Highlights and Matching module
+source ~/.vim/modules/highlights.vim
" == Window Management module
source ~/.vim/modules/window.vim
" == Tabs Management module
@@ -44,6 +49,4 @@ source ~/.vim/modules/lusty.vim
" == Syntastic module
source ~/.vim/modules/syntastic.vim
-" Show WarningMsg as errors
-hi! link Error WarningMsg
Please sign in to comment.
Something went wrong with that request. Please try again.