call pathogen#runtime_append_all_bundles()
call pathogen#helptags()
let mapleader=','
" suppress the default lusty mapping
let g:LustyJugglerDefaultMappings = 0
" file explorer
noremap <leader>o <Esc>:CommandT<CR>
noremap <leader>O <Esc>:CommandTFlush<CR>
noremap <leader>m <Esc>:CommandTBuffer<CR>
" tag list
let g:tagbar_usearrows = 1
nnoremap <leader>l :TagbarToggle<CR>
" lusty juggler for switching between buffers
nnoremap <C-y> :LustyJuggler<CR>
" settings for ctrlp plugin
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
let g:ctrlp_working_path_mode = '0'
set wildignore+=*/tmp/*,*.so,*.swp,*.zip " Linux/MacOSX
nmap <Leader>bb :ls<CR>:buffer<Space>
" buffer stuff
" "" Tab triggers buffer-name auto-completion
set wildchar=<Tab> wildmenu wildmode=full
" if system is fast enough do syntax highlighting
autocmd BufEnter * :syntax sync fromstart
" clang user options
let g:clang_user_options='|| exit 0'
" navigate buffers using arrows
" hide some files and remove stupid help
let g:netrw_list_hide='^\.,.\(pyc\|pyo\|o\)$'
"
" " Split window management
nnoremap <leader>w <C-w>v<C-w>l
nnoremap <leader>W <C-w>s
"nnoremap <leader>s :new<CR>
"
let g:miniBufExplMapWindowNavVim = 1
let g:miniBufExplMapWindowNavArrows = 1
let g:miniBufExplMapCTabSwitchBufs = 1
let g:miniBufExplModSelTarget = 1
" use space bar to close the fold
nnoremap <silent> <Space> @=(foldlevel('.')?'zA':"\<Space>")<CR><SNR>12_HandlePossibleSelectionEnter()vnoremap <Space> zf
"
map <Leader>t :CommandT<Return>
map <Leader>a :bprev<Return>
map <Leader>s :bnext<Return>
map <Leader>d :bd<Return>
map <Leader>f :b
"
" "" Show the buffer number in the status line.
set laststatus=2 statusline=%02n:%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
" new
map <F2> :NERDTreeToggle<CR>
map <F8> :tabnew
map <F5> :tabclose
map <F6> :tabprevious
map <F7> :tabnext
map :bn
map :bd
"map :tabprevious
map N Nzz
map n nzz
nnoremap ; :
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
nmap <silent> ,/ :nohlsearch<CR>
imap ^C daw
inoremap jj
inoremap kk
inoremap jk
syntax on
set gfn=Monofont\ 10
set foldmethod=syntax
set number
set hlsearch
set incsearch
set smarttab
set autoindent
set expandtab
set backupdir=~/.tmp
set directory=~/.tmp
":nmap <Space> i_<Esc>r
set textwidth=80
" saved macros
let @q ='o#ifdef _DEBUG_EXTENSOkbIONxx#endifjjkijj'
let @w ='I//jj'
let @s = 'I%jj'
" marvim
nnoremap <F3> :set nonumber!<CR>:set foldcolumn=0<CR>
filetype plugin indent on
"autocmd FileType tex :AcpDisable
" disable pyflakes..syntastic is good enough
let g:pyflakes_use_quickfix = 0
"autocmd FileType python set complete+=k~/.vim/syntax/python.vim isk+=.,(
set guifont=Neep\ 8
set ruler
set rulerformat=%55(%{strftime('%a\ %b\ %e\ %I:%M\ %p')}\ %5l,%-6(%c%V%)\ %P%)
set grepprg=grep\ -nH\ $*
"omnicomplete
:highlight PmenuSel ctermfg=black
" configure tags - add additional tags here or comment out not-used ones
set tags+=~/.vim/tags/cpp
set tags+=~/.vim/tags/gl
set tags+=~/.vim/tags/sdl
set tags+=~/.vim/tags/qt4
set tags+=~/.myTags/std3.3.tags
" build tags of your own project with Ctrl-F12
map <C-F12> :!ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
map <F4> : !ctags -R --sort=yes --c++-kinds=+p --fields=+iaS --extra=+q .<CR>
" taslit
"noremap <silent> <Leader>t :TlistToggle<CR>
nnoremap <leader>ev :vsplit $MYVIMRC<CR>
nnoremap <leader>sv :source $MYVIMRC<CR>
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>
map <A-]> :vsp <CR>:exec("tag ".expand("<cword>"))<CR>
" OmniCppComplete
let OmniCpp_NamespaceSearch = 1
let OmniCpp_GlobalScopeSearch = 1
let OmniCpp_ShowAccess = 1
let OmniCpp_ShowPrototypeInAbbr = 1 " show function parameters
let OmniCpp_MayCompleteDot = 1 " autocomplete after .
let OmniCpp_MayCompleteArrow = 1 " autocomplete after ->
let OmniCpp_MayCompleteScope = 1 " autocomplete after ::
let OmniCpp_DefaultNamespaces = ["std", "_GLIBCXX_STD"]
" start empty .tex files with plaintex
let g:tex_flavor='latex'
" automatically open and close the popup menu / preview window
au CursorMovedI,InsertLeave * if pumvisible() == 0|silent! pclose|endif
set completeopt=menuone,menu,longest,preview
"latex suite
set tabstop=4
set shiftwidth=4
set expandtab
nnoremap j gj
nnoremap k gk
cmap W w
cmap WQ wq
cmap wQ wq
cmap Q q
cmap Tabe tabe
vmap <C-c> "+yi
vmap <C-x> "+c
"vmap <C-v> c<ESC>"+p
"imap <C-v> <ESC>"+pa
"
noremap <silent> <A-Left>Â :execute 'silent! tabmove ' . (tabpagenr()-2)<CR>
nnoremap <silent> <A-Right>Â :execute 'silent! tabmove ' . tabpagenr()<CR>
" syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_mode_map = { 'mode': 'active',
\ 'active_filetypes': [],
\ 'passive_filetypes': ['python'] }
"let g:syntastic_enable_signs=1
let g:syntastic_cpp_check_header = 1
"let g:syntastic_auto_loc_list=1
if has("autocmd")
au InsertEnter * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
au InsertLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape block"
au VimLeave * silent execute "!gconftool-2 --type string --set /apps/gnome-terminal/profiles/Default/cursor_shape ibeam"
endif
" Alt-right/left to navigate forward/backward in the tags stack
map <M-h> <C-T>
map <M-l> <C-]>
"
" tab movement
let g:lasttab = 1
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()
if exists("+showtabline")
function MyTabLine()
let s = ''
let t = tabpagenr()
let i = 1
while i <= tabpagenr('$')
let buflist = tabpagebuflist(i)
let winnr = tabpagewinnr(i)
let s .= '%' . i . 'T'
let s .= (i == t ? '%1*' : '%2*')
let s .= ' '
let s .= i . ')'
let s .= ' %*'
let s .= (i == t ? '%#TabLineSel#' : '%#TabLine#')
let file = bufname(buflist[winnr - 1])
let file = fnamemodify(file, ':p:t')
if file == ''
let file = '[No Name]'
endif
let s .= file
let i = i + 1
endwhile
let s .= '%T%#TabLineFill#%='
let s .= (tabpagenr('$') > 1 ? '%999XX' : 'X')
return s
endfunction
set stal=2
set tabline=%!MyTabLine()
endif
augroup vimrc_autocmds
autocmd BufEnter * highlight OverLength ctermbg=darkgrey guibg=#592929
autocmd BufEnter * match OverLength /\%90v.*/
augroup END
set hidden