From 24fd62a10cc35a1958609448c9e9127a532c1562 Mon Sep 17 00:00:00 2001 From: gryf Date: Wed, 20 Jul 2011 22:42:20 +0200 Subject: [PATCH] vimrc cleanup --- .vimrc | 121 +++++++++++++++---------------- autoload/taglisttoo/__init__.pyc | Bin 6814 -> 0 bytes 2 files changed, 58 insertions(+), 63 deletions(-) delete mode 100644 autoload/taglisttoo/__init__.pyc diff --git a/.vimrc b/.vimrc index 8652cd6..08571b5 100644 --- a/.vimrc +++ b/.vimrc @@ -16,10 +16,8 @@ set fileformats=unix,dos "Type of in written files set formatoptions=croqw "Automatic formatting settings set hidden "Keep hidden windows set history=1000 "Keep 1000 lines of command line history -"set ignorecase "Ignore case in search patterns set laststatus=2 "Always show statusbar set lazyredraw "Don't update screen while executing macros - set listchars=tab:▸―,trail:· "Strings to use in 'list' mode. list is off by default. set number "show line numbers @@ -39,7 +37,6 @@ set shortmess=atToOI "Abbreviate some messages set showbreak=> "String to put at the start of lines that have been wrapped set showcmd "Show (partial) command in status line set showmatch "When a bracket is inserted, briefly jump to the matching one -"set smartindent "Do smart autoindenting when starting a new line filetype indent on "Indenting per filetype rather then smartindent. set smarttab "Do the smart tab/backspace behaviour set softtabstop=4 @@ -60,6 +57,9 @@ set wildchar= "Character to start wildcard expansion in th set wildmenu "Put command-line completion in an enhanced mode set wrapmargin=1 "Number of characters from the right window border where wrapping starts +set textwidth=78 +set cc=+1 + "backup/writeback/swapfile set nobackup set nowb @@ -68,10 +68,13 @@ set noswapfile "set dir=~/tmp/ " TOhtml options -:let html_number_lines = 1 -:let html_use_css = 1 -:let html_ignore_folding = 1 -:let html_use_encoding = "utf-8" +let html_number_lines = 1 +let html_use_css = 1 +let html_ignore_folding = 1 +let html_use_encoding = "utf-8" + +"Set the browser executable +let g:browser = 'firefox' "}}} "COMMON: specific vim behaviour {{{ " @@ -82,12 +85,9 @@ autocmd BufWritePre *.wiki :call StripTrailingWhitespaces() autocmd BufWritePre *.js :call StripTrailingWhitespaces() autocmd BufWritePre *.css :call StripTrailingWhitespaces() autocmd BufWritePre *.xml :call StripTrailingWhitespaces() - -" }}} -" OTHER FILES: {{{ +"set correct filetype for tmux autocmd BufRead *.tmux.conf set filetype=tmux - -"}}} +" }}} "TERMINAL: options for terminal emulators {{{ if $TERM == 'rxvt-unicode-256color' || $TERM == 'xterm' "Enable 256 colors support @@ -109,10 +109,31 @@ if $TERM == 'linux' && !has("gui_running") endif "}}} "PLUGINS: {{{ -"getscriptPlugin {{{2 -"let g:GetLatestVimScripts_allowautoinstall=1 "allow autoinstall scripts +" eclim buffers {{{ +map b :Buffers +" }}} +"VimWIKI {{{2 +let g:vimwiki_list = [{'path': '~/vimwiki/', + \ 'template_path': '~/vimwiki/', + \ 'template_default': 'default', + \ 'template_ext': '.tpl'}] +"redefine tab key for vimwiki +map wn VimwikiNextWord +map wp VimwikiPrevWord +" }}} +"FuzzyFinder {{{2 +let g:fuf_file_exclude = '\v\~$|\.(o|bak|swp|pyc|pyo|pyd)$|(^|[/\\])\.(hg|git|bzr|cvs)($|[/\\])' "}}} -"TagList{{{2 +"ShowMarks {{{2 +let g:showmarks_ignore_type = "hqprm" +let g:showmarks_include = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" +"}}} +"jsbeautify {{{3 +nnoremap ff :call g:Jsbeautify():retab! +"}}} +"TagListToo {{{2 +nmap t :TlistToo +"inherited from TagList let Tlist_Use_Right_Window = 1 "show menu in gvim. usefull to pop it up from kbd let Tlist_Show_Menu = 1 @@ -126,44 +147,11 @@ let Tlist_Sort_Type = "name" let Tlist_Exit_OnlyWindow = 1 let Tlist_WinWidth = 40 "}}} -"NERDTree {{{2 -let NERDTreeWinSize = 40 -" }}} -" eclim buffers {{{ -map b :Buffers -" }}} -"VimWIKI {{{2 -let g:vimwiki_list = [{'path': '~/vimwiki/', - \ 'template_path': '~/vimwiki/', - \ 'template_default': 'default', - \ 'template_ext': '.tpl'}] -"redefine tab key for vimwiki -map wn VimwikiNextWord -map wp VimwikiPrevWord -map ]b :call OpenInFirefox() -" }}} -"FuzzyFinder {{{2 -let g:fuf_file_exclude = '\v\~$|\.(o|bak|swp|pyc|pyo|pyd)$|(^|[/\\])\.(hg|git|bzr|cvs)($|[/\\])' -"}}} -"ShowMarks {{{2 -let g:showmarks_ignore_type = "hqprm" -let g:showmarks_include = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" -"}}} -"jsbeautify {{{3 -nnoremap ff :call g:Jsbeautify():retab! -"}}} -" pydiction {{{2 -let g:pydiction_location = '/home/gryf/.vim/after/ftplugin/pytdiction/complete-dict' -"}}} -"TagListToo {{{2 -let g:TaglistTooPosition = "right" -nmap t :TlistToo -"}}} "Tagbar {{{2 let g:tagbar_autoclose = 1 nmap T :TagbarToggle "}}} -"{{{ Pydoc +"Pydoc {{{2 let g:pydoc_cmd = "/usr/bin/pydoc" "}}} "mark {{{ @@ -189,11 +177,13 @@ nmap \dj let g:buffergator_split_size=10 let g:buffergator_viewport_split_policy='B' let g:buffergator_suppress_keymaps=1 -"map b :BuffergatorToggle -map :BuffergatorToggle +map B :BuffergatorToggle " }}} +"Gundo {{{2 +map u :GundoToggle "}}} -"KEYS: User definied keyboard shortcuts {{{ +"}}} +"KEYS: User defined keyboard shortcuts {{{ "Cycle through buffers. map :bp @@ -210,7 +200,7 @@ map :QFix map :LWin "remove trailing whitespaces -map :%s/\s\+$// +map :StripTrailingWhitespaces " copy current buffer filename (full path) nmap ,cn :silent call CopyFileName(1) @@ -218,7 +208,10 @@ nmap ,cn :silent call CopyFileName(1) nmap ,cs :silent call CopyFileName(0) "FuzzyFinder plugin. Keys for file fuf -map :TlistToo!:FufFile **/ +map :FufFile **/ + +"open link under cursor in Firefox +map ]b :call OpenInWebBrowser() " }}} " FUNCTIONS: usefull functions for all of th files {{{ @@ -231,6 +224,7 @@ function Make() if getqflist() != [] copen endif + redraw endfunction " Remove trailing whitespace @@ -245,6 +239,7 @@ function StripTrailingWhitespaces() let @/=_s call cursor(l, c) endfunction +command StripTrailingWhitespaces call StripTrailingWhitespaces() function CopyFileName(full) if a:full @@ -264,7 +259,7 @@ endfunction " Toggle QuickFix buffer command -bang -nargs=? QFix call QFixToggle(0) -function! QFixToggle(forced) +function QFixToggle(forced) if exists("g:qfix_win") && a:forced == 0 cclose unlet g:qfix_win @@ -276,7 +271,7 @@ endfunction " Toggle location buffer command -bang -nargs=? LWin call LocationWindowToggle(0) -function! LocationWindowToggle(forced) +function LocationWindowToggle(forced) if exists("g:loc_win") && a:forced == 0 lclose unlet g:loc_win @@ -286,9 +281,9 @@ function! LocationWindowToggle(forced) endif endfunction -" OpenInFirefox -" try to open url in Firefox -function! OpenInFirefox() +" OpenInWebBrowser +" try to open url in selected web browser +function OpenInWebBrowser() let l:line = getline(".") let l:cursor_position = getpos(".")[2] let l:url = "" @@ -307,9 +302,9 @@ function! OpenInFirefox() endfor if len(l:url) > 0 - call system("firefox " . l:url) + call system(g:browser . " " . l:url) echohl Statement - echo "Opened '" . l:url ."' in firefox." + echo "Opened '" . l:url ."' in " . g:browser else echohl WarningMsg echo "Not an URL under cursor." @@ -328,8 +323,8 @@ if has('gui_running') "window in one place, and also this will conserve space. Tabs are huge "under GTK. set guioptions=agit - "add menuitem OpenInFirefox - nmenu 666 PopUp.&Open\ in\ browser :call OpenInFirefox() + "add menuitem OpenInWebBrowser + nmenu 666 PopUp.&Open\ in\ browser :call OpenInWebBrowser() "Turn off annoying beep au GUIEnter * set vb t_vb= endif diff --git a/autoload/taglisttoo/__init__.pyc b/autoload/taglisttoo/__init__.pyc deleted file mode 100644 index fe6e9992bb62683b07efa73d0f12be566051d680..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6814 zcmcIpTW{Ou8U9E)vZchab8?cdXt|&%oWhRV4o$l(StCod%}$m)QjU_KnWl)8Lt7#h zepC*Hj15bF!*;ccU2j*r+OPowhFuQ(5yJ))*u^gP1GeXRDaB5jV!+bH<)`;Mz2_6z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