Anonymous avatar Anonymous committed c10490d

merge changes from the first weeks back at TTTech

Comments (0)

Files changed (1)

 
 
 if has("gui_running")
-    set rtp+=~/.vim/bundle/vundle/
+    set rtp+=$HOME/.vim/bundle/vundle/"
     call vundle#rc()
 
     " --- github plugins
     Bundle 'tpope/vim-surround'
     Bundle 'kien/ctrlp.vim'
     Bundle 'altercation/vim-colors-solarized'
+    Bundle 'therubymug/vim-pyte'
 
-    " from vim-scripts
+    " from github vim-scripts
     Bundle 'a.vim'
     Bundle 'Mark--Karkat'
+    Bundle 'Align'
 
     " Brief Help
     " :BundleInstall  - install bundles (won't update installed)
 " statusline
 set laststatus=2
 " don't move cursor to first char in line
-set nosol
+set noeol
 " everything in English please
 language en_US
 " enable spell checking by default, 10 suggestions are enough
 set wildmenu
 " smother redraw
 set ttyfast
-" set terminal title
-set title
 " no beep
 set noeb
 " I will never care about these files
-set wildignore+=*.pyc,*.swp,*.o
+set wildignore+=*.pyc,*.pyo,*.swp,*.o
+" display the current working  directory in the window title
+set title
+set titlestring=%{getcwd()}
 
 " --- GUI specific settings----------------------------------------------------
 
     colorscheme solarized
     " highlight current line
     set cursorline
+    set columns=125
+    set lines=50
+    if has("win32")
+        set guifont=Consolas
+    endif
 else
     set t_Co=256
 endif
 nnoremap <leader>sv :source $MYVIMRC<CR>
 nnoremap <leader>ev :vsplit $MYVIMRC<CR>
 
+" change directory to the directory of the current file
+nnoremap <leader>cd :cd %:p:h<CR>
 " keep Ctrl pressed to move around between windows
 nnoremap <C-h> <C-w>h
 nnoremap <C-j> <C-w>j
 nnoremap <C-k> <C-w>k
 nnoremap <C-l> <C-w>l
 
-" Get rid of that stupid goddamned help key that you will invariably hit
+" Get rid of that stupid help key that you will invariably hit
 " constantly while aiming for escape:
 inoremap <F1> <ESC>
 nnoremap <F1> <ESC>
 
 nnoremap <F5> :nohlsearch<CR>:MarkClear<CR>
 nnoremap <F6> :set invspell<CR>
-nnoremap <F8> :%s/\s\+$//e<CR>   "remove trailing whitespace
+"remove trailing whitespace
+nnoremap <F8> :%s/\s\+$//e<CR>
+"update ctags db
+nnoremap <F9> :!ctags -R *<CR><CR>
 
 " --- (auto)commands ----------------------------------------------------
-command Wa wa        " map :Wa to :wa
-autocmd FocusLost * :wa   " always save all files when editor looses focus
+command! Wa wa              " map :Wa to :wa
+autocmd FocusLost * :wa     " always save all files when editor looses focus
 
 " --- abbreviations -----------------------------------------------------
 iab pdb import pdb;pdb.set_trace()<ESC>
 
 " --- configure Plugins -------------------------------------------------
-" Ack
+" Pss
 nnoremap <F2> :Pss <CR>
-nnoremap <leader>p :Pss<Space>
+nnoremap <leader>f :Pss<Space>
 
 " tagbar
 nnoremap <F3> :TagbarToggle<CR>
 nnoremap <F4> :NERDTreeToggle ~/Documents/src<CR>
 let NERDTreeShowBookmarks=1
 let NERDTreeShowLineNumbers=0
-let NERDTreeIgnore=['\.vim$', '\~$']
+let NERDTreeIgnore=['\.vim$', '\~$', '\.pyc$', '\.pyo$']
 
 " Scratch
 nnoremap <leader><tab> :ScratchOpen<CR>
 " some ctrlp settings
 let g:ctrlp_max_height = 20
 let g:ctrlp_working_path_mode = 0
-let g:ctrlp_dotfiles = 0  " do not search dotfiles or within dot directories
+let g:ctrlp_show_hidden = 0  " do not search dotfiles or within dot directories
+let g:ctrlp_clear_cache_on_exit = 0  " keep cache files around, press F5 for refresh
+let g:ctrlp_use_caching = 1
+let g:ctrlp_cache_dir = $HOME.'/.vim/ctrlp'
+let g:ctrlp_extensions = ['tag']
+nnoremap <leader>. :CtrlP<CR>
+nnoremap <leader>t :CtrlPTag<CR>
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.