diff --git a/ftplugin/python/common.vim b/ftplugin/python/common.vim index 8ee6c34..2b786c9 100644 --- a/ftplugin/python/common.vim +++ b/ftplugin/python/common.vim @@ -7,7 +7,15 @@ setlocal noautoindent setlocal smartindent setlocal cinwords=if,elif,else,for,while,try,except,finally,def,class,with setlocal smarttab -setlocal statusline=%<%F\ %{TagInStatusLine()}\ %h%m%r%=%(%l,%c%V%)\ %3p%% + +setlocal statusline=%<%F " filename (fullpath) +setlocal statusline+=\ %h " indicator for help buffer +setlocal statusline+=%m " modified flag +setlocal statusline+=%r " readonly flag +setlocal statusline+=\ %{TagInStatusLine()} " current tag and its type +setlocal statusline+=%= " switch to the right +setlocal statusline+=%(%l,%c%V%) " line, column and virtual column +setlocal statusline+=\ %3p%% " percentage of the file set wildignore+=*.pyc @@ -27,7 +35,7 @@ autocmd BufWinEnter *.py silent loadview finish "end here. all below is just for the record. -" Pylint function, which can be optionally mapped to some keys. Currently +" Pylint function, which can be optionally mapped to some keys. Currently " not used. if !exists('*runPyLint') function runPyLint() @@ -49,7 +57,7 @@ if !exists('*PyLintBuf') if has('win32') || has('win64') let cmd = 'cmd /c "' . cmd . '"' endif - + exec "bel silent new " . file . ".lint" exec "silent! read! " . cmd endfunction diff --git a/vimrc b/vimrc index 60632dd..817a62b 100644 --- a/vimrc +++ b/vimrc @@ -20,7 +20,8 @@ Plug 'https://repo.or.cz/r/vcscommand.git' Plug 'kazuyukitanimura/jsbeautify' Plug 'kevinw/pyflakes-vim' Plug 'kien/ctrlp.vim' -Plug 'majutsushi/tagbar' +" Plug 'majutsushi/tagbar' +Plug 'gryf/tagbar', {'branch': 'show_tag_kind2'} Plug 'mattn/calendar-vim' Plug 'mduan/python.vim' Plug 'mikeage/occur.vim' @@ -82,7 +83,15 @@ set number "show line numbers " Show ruler and set format of statusline set ruler -set statusline=%<%F\ %h%m%r%=%(%l,%c%V%)\ %3p%% +set statusline=%<%F " filename (fullpath) +set statusline+=\ %h " indicator for help buffer +set statusline+=%m " modified flag +set statusline+=%r " readonly flag +set statusline+=\ %{tagbar#currenttag('%s','','f')} " current tag +set statusline+=\ %{tagbar#currenttagtype('(%s)','')} " current tag type +set statusline+=%= " switch to the right +set statusline+=%(%l,%c%V%) " line, column and virtual column +set statusline+=\ %3p%% " percentage of the file set scrolloff=5 "Minimal number of screen lines to keep above and below the cursor set selection=exclusive "Define the behavior of the selection @@ -178,44 +187,48 @@ if $TERM == 'linux' && !has("gui_running") endif "}}} "PLUGINS: {{{ -"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)($|[/\\])' -"map :FufFile **/ +"KickAssembler {{{2 +let g:kickass_path = '/home/gryf/c64/PCTools/Cross-assemblers/KickAssembler/KickAss.jar' "}}} -"ShowMarks {{{2 -let g:showmarks_ignore_type = "hqprm" -let g:showmarks_include = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" +"CtrlP {{{2 +let g:ctrlp_custom_ignore = { + \ 'dir': '\.git$\|\.hg$\|\.svn$', + \ 'file': '\.pyo$\|\.pyc$\|\.pyd$', + \ } +let g:ctrlp_map = '' +map :CtrlPBuffer +"}}} +" DirDiff {{{2 +let g:DirDiffExcludes = ".svn,CVS,*.class,*.exe,.*.swp,*.pyc,*.pyo" +" Make use of cursor keys +nmap [c +nmap ]c +nmap \dk +nmap \dj +" }}} +"Dragvisuals {{{2 +vmap DVB_Drag('left') +vmap DVB_Drag('right') +vmap DVB_Drag('down') +vmap DVB_Drag('up') +vmap D DVB_Duplicate() +"}}} +"Gundo {{{2 +map u :GundoToggle +"}}} +"Jedi {{{ +" automatically popup is annoying +let g:jedi#popup_on_dot = 0 +" also this one is pretty annoying +let g:jedi#show_call_signatures = "0" +"let g:languagetool_lang=pl "}}} "jsbeautify {{{2 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 -let Tlist_Auto_Open = 0 -let Tlist_Display_Prototype = 1 -"open fold for current buff, and close all others... -let Tlist_File_Fold_Auto_Close = 1 -".. or just display current file -"let Tlist_Show_One_File = 1 -let Tlist_Sort_Type = "name" -let Tlist_Exit_OnlyWindow = 1 -let Tlist_WinWidth = 40 -"}}} -"Pydoc {{{2 -let g:pydoc_cmd = "/usr/bin/pydoc" +"LanguageTool {{{ +let g:languagetool_jar='/opt/LanguageTool/languagetool-commandline.jar' +"let g:languagetool_lang=pl "}}} "mark {{{2 " addidtional colors -- @@ -227,73 +240,51 @@ fun! s:CustomHighlightings() endfun autocmd ColorScheme * call CustomHighlightings() -"}}} -" DirDiff {{{2 -let g:DirDiffExcludes = ".svn,CVS,*.class,*.exe,.*.swp,*.pyc,*.pyo" -" Make use of cursor keys -nmap [c -nmap ]c -nmap \dk -nmap \dj -" }}} -"Gundo {{{2 -map u :GundoToggle -"}}} -"CtrlP {{{2 -let g:ctrlp_custom_ignore = { - \ 'dir': '\.git$\|\.hg$\|\.svn$', - \ 'file': '\.pyo$\|\.pyc$\|\.pyd$', - \ } -let g:ctrlp_map = '' -map :CtrlPBuffer "}}} "NERDCommenter {{{2 let g:NERDSpaceDelims=1 "}}} -"Python indent{{{2 -let g:python_version_2=1 -"}}} -"LanguageTool {{{ -let g:languagetool_jar='/opt/LanguageTool/languagetool-commandline.jar' -"let g:languagetool_lang=pl -"}}} -"Jedi {{{ -" automatically popup is annoying -let g:jedi#popup_on_dot = 0 -" also this one is pretty annoying -let g:jedi#show_call_signatures = "0" -"let g:languagetool_lang=pl -"}}} "NERDtree {{{ map :NERDTreeToggle "}}} -"Riv {{{ -" Don't fold the file; it's annoying -let g:riv_fold_level = -1 -" formatting tables, doesn't work so good with complex grid tables -let g:riv_auto_format_table = 0 -"}}} " Occur {{{ nnoremap oc :Occur nnoremap om :Moccur nnoremap 8 *:Moccur " }}} +"Pydoc {{{2 +let g:pydoc_cmd = "/usr/bin/pydoc" +"}}} +"Python indent{{{2 +let g:python_version_2=1 +"}}} " Pythonhelper {{{2 let g:pythonhelper_updatetime = 1000 " }}} -"TagListToo {{{2 +"Riv {{{ +" Don't fold the file; it's annoying +let g:riv_fold_level = -1 +" formatting tables, doesn't work so good with complex grid tables +let g:riv_auto_format_table = 0 +"}}} +"ShowMarks {{{2 +let g:showmarks_ignore_type = "hqprm" +let g:showmarks_include = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ" +"}}} +"Tagbar {{{2 nmap t :Tagbar +let g:tagbar_compact = 1 +" Note: see statusline settings for status bar tag conf "}}} -"KickAssembler {{{2 -let g:kickass_path = '/home/gryf/c64/PCTools/Cross-assemblers/KickAssembler/KickAss.jar' -"}}} -"Dragvisuals {{{2 -vmap DVB_Drag('left') -vmap DVB_Drag('right') -vmap DVB_Drag('down') -vmap DVB_Drag('up') -vmap D DVB_Duplicate() -"}}} +"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 +" }}} "}}} "KEYS: User defined keyboard shortcuts {{{