diff --git a/.vim/.netrwhist b/.vim/.netrwhist new file mode 100644 index 0000000..7e72db0 --- /dev/null +++ b/.vim/.netrwhist @@ -0,0 +1,3 @@ +let g:netrw_dirhistmax =10 +let g:netrw_dirhist_cnt =1 +let g:netrw_dirhist_1='/boot/grub/themes/Archlinux' diff --git a/.vim/autoload/pathogen.vim b/.vim/autoload/pathogen.vim new file mode 120000 index 0000000..a47dcdf --- /dev/null +++ b/.vim/autoload/pathogen.vim @@ -0,0 +1 @@ +../pathogen/autoload/pathogen.vim \ No newline at end of file diff --git a/.vim/bundle/base16-vim b/.vim/bundle/base16-vim new file mode 160000 index 0000000..e5f2e53 --- /dev/null +++ b/.vim/bundle/base16-vim @@ -0,0 +1 @@ +Subproject commit e5f2e537430714e0f07e2ca914c93710704dd9e1 diff --git a/.vim/bundle/onedark.vim b/.vim/bundle/onedark.vim new file mode 160000 index 0000000..b5827a2 --- /dev/null +++ b/.vim/bundle/onedark.vim @@ -0,0 +1 @@ +Subproject commit b5827a28426eb5200f23933c855e77c581e8fa15 diff --git a/.vim/bundle/vim-Grammalecte b/.vim/bundle/vim-Grammalecte new file mode 160000 index 0000000..3b41fa6 --- /dev/null +++ b/.vim/bundle/vim-Grammalecte @@ -0,0 +1 @@ +Subproject commit 3b41fa646c2a870b921e960bcd7948c36601f4a3 diff --git a/.vim/bundle/vim-fish b/.vim/bundle/vim-fish new file mode 160000 index 0000000..3fe6db2 --- /dev/null +++ b/.vim/bundle/vim-fish @@ -0,0 +1 @@ +Subproject commit 3fe6db25bf03b16e87a162172dd3f908be7d028d diff --git a/.vim/bundle/vim-syntax-lighttpd b/.vim/bundle/vim-syntax-lighttpd new file mode 160000 index 0000000..eb9483c --- /dev/null +++ b/.vim/bundle/vim-syntax-lighttpd @@ -0,0 +1 @@ +Subproject commit eb9483c32f4e73452be2f18be21f7060f4e28c96 diff --git a/.vim/bundle/vim-table-mode b/.vim/bundle/vim-table-mode new file mode 160000 index 0000000..a646b40 --- /dev/null +++ b/.vim/bundle/vim-table-mode @@ -0,0 +1 @@ +Subproject commit a646b4033ba86496ee0fff442ce8540551040275 diff --git a/.vim/colors/base16-eighties.vim b/.vim/colors/base16-eighties.vim new file mode 100644 index 0000000..4bff7e2 --- /dev/null +++ b/.vim/colors/base16-eighties.vim @@ -0,0 +1,327 @@ +" vi:syntax=vim + +" base16-vim (https://github.com/chriskempson/base16-vim) +" by Chris Kempson (http://chriskempson.com) +" Eighties scheme by Chris Kempson (http://chriskempson.com) + +" This enables the coresponding base16-shell script to run so that +" :colorscheme works in terminals supported by base16-shell scripts +" User must set this variable in .vimrc +" let g:base16_shell_path=base16-builder/output/shell/ +if !has('gui_running') + if exists("g:base16_shell_path") + execute "silent !/bin/sh ".g:base16_shell_path."/base16-eighties.sh" + endif +endif + +" GUI color definitions +let s:gui00 = "2d2d2d" +let s:gui01 = "393939" +let s:gui02 = "515151" +let s:gui03 = "747369" +let s:gui04 = "a09f93" +let s:gui05 = "d3d0c8" +let s:gui06 = "e8e6df" +let s:gui07 = "f2f0ec" +let s:gui08 = "f2777a" +let s:gui09 = "f99157" +let s:gui0A = "ffcc66" +let s:gui0B = "99cc99" +let s:gui0C = "66cccc" +let s:gui0D = "6699cc" +let s:gui0E = "cc99cc" +let s:gui0F = "d27b53" + +" Terminal color definitions +let s:cterm00 = "00" +let s:cterm03 = "08" +let s:cterm05 = "07" +let s:cterm07 = "15" +let s:cterm08 = "01" +let s:cterm0A = "03" +let s:cterm0B = "02" +let s:cterm0C = "06" +let s:cterm0D = "04" +let s:cterm0E = "05" +if exists('base16colorspace') && base16colorspace == "256" + let s:cterm01 = "18" + let s:cterm02 = "19" + let s:cterm04 = "20" + let s:cterm06 = "21" + let s:cterm09 = "16" + let s:cterm0F = "17" +else + let s:cterm01 = "10" + let s:cterm02 = "11" + let s:cterm04 = "12" + let s:cterm06 = "13" + let s:cterm09 = "09" + let s:cterm0F = "14" +endif + +" Neovim terminal colours +if has("nvim") + let g:terminal_color_0 = "#2d2d2d" + let g:terminal_color_1 = "#f2777a" + let g:terminal_color_2 = "#99cc99" + let g:terminal_color_3 = "#ffcc66" + let g:terminal_color_4 = "#6699cc" + let g:terminal_color_5 = "#cc99cc" + let g:terminal_color_6 = "#66cccc" + let g:terminal_color_7 = "#d3d0c8" + let g:terminal_color_8 = "#747369" + let g:terminal_color_9 = "#f99157" + let g:terminal_color_10 = "#393939" + let g:terminal_color_11 = "#515151" + let g:terminal_color_12 = "#a09f93" + let g:terminal_color_13 = "#e8e6df" + let g:terminal_color_14 = "#d27b53" + let g:terminal_color_15 = "#f2f0ec" + let g:terminal_color_background = g:terminal_color_0 + let g:terminal_color_foreground = g:terminal_color_7 + if &background == "light" + let g:terminal_color_background = g:terminal_color_7 + let g:terminal_color_foreground = g:terminal_color_2 + endif +endif + +" Theme setup +hi clear +syntax reset +let g:colors_name = "base16-eighties" + +" Highlighting function +fun hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp) + if a:guifg != "" + exec "hi " . a:group . " guifg=#" . a:guifg + endif + if a:guibg != "" + exec "hi " . a:group . " guibg=#" . a:guibg + endif + if a:ctermfg != "" + exec "hi " . a:group . " ctermfg=" . a:ctermfg + endif + if a:ctermbg != "" + exec "hi " . a:group . " ctermbg=" . a:ctermbg + endif + if a:attr != "" + exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr + endif + if a:guisp != "" + exec "hi " . a:group . " guisp=#" . a:guisp + endif +endfun + +" Vim editor colors +call hi("Bold", "", "", "", "", "bold", "") +call hi("Debug", s:gui08, "", s:cterm08, "", "", "") +call hi("Directory", s:gui0D, "", s:cterm0D, "", "", "") +call hi("Error", s:gui00, s:gui08, s:cterm00, s:cterm08, "", "") +call hi("ErrorMsg", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") +call hi("Exception", s:gui08, "", s:cterm08, "", "", "") +call hi("FoldColumn", s:gui0C, s:gui01, s:cterm0C, s:cterm01, "", "") +call hi("Folded", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") +call hi("IncSearch", s:gui01, s:gui09, s:cterm01, s:cterm09, "none", "") +call hi("Italic", "", "", "", "", "none", "") +call hi("Macro", s:gui08, "", s:cterm08, "", "", "") +call hi("MatchParen", "", s:gui03, "", s:cterm03, "", "") +call hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "") +call hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "") +call hi("Question", s:gui0D, "", s:cterm0D, "", "", "") +call hi("Search", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "", "") +call hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "") +call hi("TooLong", s:gui08, "", s:cterm08, "", "", "") +call hi("Underlined", s:gui08, "", s:cterm08, "", "", "") +call hi("Visual", "", s:gui02, "", s:cterm02, "", "") +call hi("VisualNOS", s:gui08, "", s:cterm08, "", "", "") +call hi("WarningMsg", s:gui08, "", s:cterm08, "", "", "") +call hi("WildMenu", s:gui08, s:gui0A, s:cterm08, "", "", "") +call hi("Title", s:gui0D, "", s:cterm0D, "", "none", "") +call hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") +call hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "") +call hi("NonText", s:gui03, "", s:cterm03, "", "", "") +call hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") +call hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") +call hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") +call hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "") +call hi("StatusLineNC", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") +call hi("VertSplit", s:gui02, s:gui02, s:cterm02, s:cterm02, "none", "") +call hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "") +call hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "") +call hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "") +call hi("CursorLineNr", s:gui04, s:gui01, s:cterm04, s:cterm01, "", "") +call hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "") +call hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "") +call hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") +call hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") +call hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "") + +" Standard syntax highlighting +call hi("Boolean", s:gui09, "", s:cterm09, "", "", "") +call hi("Character", s:gui08, "", s:cterm08, "", "", "") +call hi("Comment", s:gui03, "", s:cterm03, "", "", "") +call hi("Conditional", s:gui0E, "", s:cterm0E, "", "", "") +call hi("Constant", s:gui09, "", s:cterm09, "", "", "") +call hi("Define", s:gui0E, "", s:cterm0E, "", "none", "") +call hi("Delimiter", s:gui0F, "", s:cterm0F, "", "", "") +call hi("Float", s:gui09, "", s:cterm09, "", "", "") +call hi("Function", s:gui0D, "", s:cterm0D, "", "", "") +call hi("Identifier", s:gui08, "", s:cterm08, "", "none", "") +call hi("Include", s:gui0D, "", s:cterm0D, "", "", "") +call hi("Keyword", s:gui0E, "", s:cterm0E, "", "", "") +call hi("Label", s:gui0A, "", s:cterm0A, "", "", "") +call hi("Number", s:gui09, "", s:cterm09, "", "", "") +call hi("Operator", s:gui05, "", s:cterm05, "", "none", "") +call hi("PreProc", s:gui0A, "", s:cterm0A, "", "", "") +call hi("Repeat", s:gui0A, "", s:cterm0A, "", "", "") +call hi("Special", s:gui0C, "", s:cterm0C, "", "", "") +call hi("SpecialChar", s:gui0F, "", s:cterm0F, "", "", "") +call hi("Statement", s:gui08, "", s:cterm08, "", "", "") +call hi("StorageClass", s:gui0A, "", s:cterm0A, "", "", "") +call hi("String", s:gui0B, "", s:cterm0B, "", "", "") +call hi("Structure", s:gui0E, "", s:cterm0E, "", "", "") +call hi("Tag", s:gui0A, "", s:cterm0A, "", "", "") +call hi("Todo", s:gui0A, s:gui01, s:cterm0A, s:cterm01, "", "") +call hi("Type", s:gui0A, "", s:cterm0A, "", "none", "") +call hi("Typedef", s:gui0A, "", s:cterm0A, "", "", "") + +" C highlighting +call hi("cOperator", s:gui0C, "", s:cterm0C, "", "", "") +call hi("cPreCondit", s:gui0E, "", s:cterm0E, "", "", "") + +" C# highlighting +call hi("csClass", s:gui0A, "", s:cterm0A, "", "", "") +call hi("csAttribute", s:gui0A, "", s:cterm0A, "", "", "") +call hi("csModifier", s:gui0E, "", s:cterm0E, "", "", "") +call hi("csType", s:gui08, "", s:cterm08, "", "", "") +call hi("csUnspecifiedStatement", s:gui0D, "", s:cterm0D, "", "", "") +call hi("csContextualStatement", s:gui0E, "", s:cterm0E, "", "", "") +call hi("csNewDecleration", s:gui08, "", s:cterm08, "", "", "") + +" CSS highlighting +call hi("cssBraces", s:gui05, "", s:cterm05, "", "", "") +call hi("cssClassName", s:gui0E, "", s:cterm0E, "", "", "") +call hi("cssColor", s:gui0C, "", s:cterm0C, "", "", "") + +" Diff highlighting +call hi("DiffAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") +call hi("DiffChange", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") +call hi("DiffDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") +call hi("DiffText", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") +call hi("DiffAdded", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "") +call hi("DiffFile", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") +call hi("DiffNewFile", s:gui0B, s:gui00, s:cterm0B, s:cterm00, "", "") +call hi("DiffLine", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") +call hi("DiffRemoved", s:gui08, s:gui00, s:cterm08, s:cterm00, "", "") + +" Git highlighting +call hi("gitcommitOverflow", s:gui08, "", s:cterm08, "", "", "") +call hi("gitcommitSummary", s:gui0B, "", s:cterm0B, "", "", "") +call hi("gitcommitComment", s:gui03, "", s:cterm03, "", "", "") +call hi("gitcommitUntracked", s:gui03, "", s:cterm03, "", "", "") +call hi("gitcommitDiscarded", s:gui03, "", s:cterm03, "", "", "") +call hi("gitcommitSelected", s:gui03, "", s:cterm03, "", "", "") +call hi("gitcommitHeader", s:gui0E, "", s:cterm0E, "", "", "") +call hi("gitcommitSelectedType", s:gui0D, "", s:cterm0D, "", "", "") +call hi("gitcommitUnmergedType", s:gui0D, "", s:cterm0D, "", "", "") +call hi("gitcommitDiscardedType", s:gui0D, "", s:cterm0D, "", "", "") +call hi("gitcommitBranch", s:gui09, "", s:cterm09, "", "bold", "") +call hi("gitcommitUntrackedFile", s:gui0A, "", s:cterm0A, "", "", "") +call hi("gitcommitUnmergedFile", s:gui08, "", s:cterm08, "", "bold", "") +call hi("gitcommitDiscardedFile", s:gui08, "", s:cterm08, "", "bold", "") +call hi("gitcommitSelectedFile", s:gui0B, "", s:cterm0B, "", "bold", "") + +" GitGutter highlighting +call hi("GitGutterAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") +call hi("GitGutterChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") +call hi("GitGutterDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") +call hi("GitGutterChangeDelete", s:gui0E, s:gui01, s:cterm0E, s:cterm01, "", "") + +" HTML highlighting +call hi("htmlBold", s:gui0A, "", s:cterm0A, "", "", "") +call hi("htmlItalic", s:gui0E, "", s:cterm0E, "", "", "") +call hi("htmlEndTag", s:gui05, "", s:cterm05, "", "", "") +call hi("htmlTag", s:gui05, "", s:cterm05, "", "", "") + +" JavaScript highlighting +call hi("javaScript", s:gui05, "", s:cterm05, "", "", "") +call hi("javaScriptBraces", s:gui05, "", s:cterm05, "", "", "") +call hi("javaScriptNumber", s:gui09, "", s:cterm09, "", "", "") +" pangloss/vim-javascript highlighting +call hi("jsOperator", s:gui0D, "", s:cterm0D, "", "", "") +call hi("jsStatement", s:gui0E, "", s:cterm0E, "", "", "") +call hi("jsReturn", s:gui0E, "", s:cterm0E, "", "", "") +call hi("jsThis", s:gui08, "", s:cterm08, "", "", "") +call hi("jsClassDefinition", s:gui0A, "", s:cterm0A, "", "", "") +call hi("jsFunction", s:gui0E, "", s:cterm0E, "", "", "") +call hi("jsFuncName", s:gui0D, "", s:cterm0D, "", "", "") +call hi("jsFuncCall", s:gui0D, "", s:cterm0D, "", "", "") +call hi("jsClassFuncName", s:gui0D, "", s:cterm0D, "", "", "") +call hi("jsClassMethodType", s:gui0E, "", s:cterm0E, "", "", "") +call hi("jsRegexpString", s:gui0C, "", s:cterm0C, "", "", "") +call hi("jsGlobalObjects", s:gui0A, "", s:cterm0A, "", "", "") +call hi("jsGlobalNodeObjects", s:gui0A, "", s:cterm0A, "", "", "") +call hi("jsExceptions", s:gui0A, "", s:cterm0A, "", "", "") +call hi("jsBuiltins", s:gui0A, "", s:cterm0A, "", "", "") + +" Mail highlighting +call hi("mailQuoted1", s:gui0A, "", s:cterm0A, "", "", "") +call hi("mailQuoted2", s:gui0B, "", s:cterm0B, "", "", "") +call hi("mailQuoted3", s:gui0E, "", s:cterm0E, "", "", "") +call hi("mailQuoted4", s:gui0C, "", s:cterm0C, "", "", "") +call hi("mailQuoted5", s:gui0D, "", s:cterm0D, "", "", "") +call hi("mailQuoted6", s:gui0A, "", s:cterm0A, "", "", "") +call hi("mailURL", s:gui0D, "", s:cterm0D, "", "", "") +call hi("mailEmail", s:gui0D, "", s:cterm0D, "", "", "") + +" Markdown highlighting +call hi("markdownCode", s:gui0B, "", s:cterm0B, "", "", "") +call hi("markdownError", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "") +call hi("markdownCodeBlock", s:gui0B, "", s:cterm0B, "", "", "") +call hi("markdownHeadingDelimiter", s:gui0D, "", s:cterm0D, "", "", "") + +" NERDTree highlighting +call hi("NERDTreeDirSlash", s:gui0D, "", s:cterm0D, "", "", "") +call hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "") + +" PHP highlighting +call hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "") +call hi("phpComparison", s:gui05, "", s:cterm05, "", "", "") +call hi("phpParent", s:gui05, "", s:cterm05, "", "", "") + +" Python highlighting +call hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "") +call hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "") + +" Ruby highlighting +call hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "") +call hi("rubyConstant", s:gui0A, "", s:cterm0A, "", "", "") +call hi("rubyInterpolationDelimiter", s:gui0F, "", s:cterm0F, "", "", "") +call hi("rubyRegexp", s:gui0C, "", s:cterm0C, "", "", "") +call hi("rubySymbol", s:gui0B, "", s:cterm0B, "", "", "") +call hi("rubyStringDelimiter", s:gui0B, "", s:cterm0B, "", "", "") + +" SASS highlighting +call hi("sassidChar", s:gui08, "", s:cterm08, "", "", "") +call hi("sassClassChar", s:gui09, "", s:cterm09, "", "", "") +call hi("sassInclude", s:gui0E, "", s:cterm0E, "", "", "") +call hi("sassMixing", s:gui0E, "", s:cterm0E, "", "", "") +call hi("sassMixinName", s:gui0D, "", s:cterm0D, "", "", "") + +" Signify highlighting +call hi("SignifySignAdd", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "", "") +call hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "") +call hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") + +" Spelling highlighting +call hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08) +call hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C) +call hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D) +call hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E) + +" Remove functions +delf hi + +" Remove color variables +unlet s:gui00 s:gui01 s:gui02 s:gui03 s:gui04 s:gui05 s:gui06 s:gui07 s:gui08 s:gui09 s:gui0A s:gui0B s:gui0C s:gui0D s:gui0E s:gui0F +unlet s:cterm00 s:cterm01 s:cterm02 s:cterm03 s:cterm04 s:cterm05 s:cterm06 s:cterm07 s:cterm08 s:cterm09 s:cterm0A s:cterm0B s:cterm0C s:cterm0D s:cterm0E s:cterm0F diff --git a/.vim/compiler/pylint.vim b/.vim/compiler/pylint.vim new file mode 100644 index 0000000..424e3e8 --- /dev/null +++ b/.vim/compiler/pylint.vim @@ -0,0 +1,322 @@ +" Vim compiler file for Python +" Compiler: Style checking tool for Python +" Maintainer: Cong Ma +" Last Change: 2014 April 15 +" Version: 0.8dev +" Contributors: +" Oleksandr Tymoshenko +" Artur Wroblewski +" Menno +" Jose Blanca +" Bogdan Frankovskyi +" Oren Held +" Cong Ma +" +" Installation: +" Drop pylint.vim in ~/.vim/compiler directory. Ensure that your PATH +" environment variable includes the path to 'pylint' executable. +" +" Add the following line to the autocmd section of .vimrc +" +" autocmd FileType python compiler pylint +" +" Usage: +" Pylint is called after a buffer with Python code is saved. QuickFix +" window is opened to show errors, warnings and hints provided by Pylint. +" Code rate calculated by Pylint is displayed at the bottom of the +" window. +" +" Above is realized with :Pylint command. To disable calling Pylint every +" time a buffer is saved put into .vimrc file +" +" let g:pylint_onwrite = 0 +" +" Displaying code rate calculated by Pylint can be avoided by setting +" +" let g:pylint_show_rate = 0 +" +" Openning of QuickFix window can be disabled with +" +" let g:pylint_cwindow = 0 +" +" Setting signs for the lines with errors can be enabled with +" +" let g:pylint_signs = 1 +" +" Of course, standard :make command can be used as in case of every +" other compiler. +" +" Setting highlights for the lines can be disabled with +" +" let g:pylint_inline_highlight = 0 +" +" Coding style warning highlight can be disabled with +" +" let g:pylint_conventions = 0 +" +" Warning highlight can be disabled with +" +" let g:pylint_warning = 0 +" + +if exists('current_compiler') + finish +endif +let current_compiler = 'pylint' + +if !exists('g:pylint_onwrite') + let g:pylint_onwrite = 1 +endif + +if !exists('g:pylint_onfly') + let g:pylint_onfly = 0 +endif + +if !exists('g:pylint_show_rate') + let g:pylint_show_rate = 1 +endif + +if !exists('g:pylint_cwindow') + let g:pylint_cwindow = 1 +endif + +if !exists('g:pylint_signs') + let g:pylint_signs = 0 +endif + +if !exists('g:pylint_inline_highlight') + let g:pylint_inline_highlight = 1 +endif + +if !exists('g:pylint_warning') + let g:pylint_warning = 1 +endif + +if !exists('g:pylint_conventions') + let g:pylint_conventions = 1 +endif + +if exists(':Pylint') != 2 + command Pylint :call Pylint(0) +endif + +if exists(":CompilerSet") != 2 " older Vim always used :setlocal + command -nargs=* CompilerSet setlocal +endif + +au CursorHold call s:GetPylintMessage() +au CursorMoved call s:GetPylintMessage() + + +" We should echo filename because pylint truncates .py +" If someone know better way - let me know :) +CompilerSet makeprg=(echo\ '[%]';pylint\ --msg-template=\"{msg_id}:{line},{column}:\ {msg}\"\ '%'\\\|grep\ -E\ -e\ \'^\([WECR][0-9]\\\|Your\ code\)\'\\\|sed\ -e\ \'s/^E/1\ E\ /\'\ -e\ \'s/^W/2\ W\ /\'\ -e\ \'s/^C/3\ C\ /\'\ -e\ \'s/^R/4\ R\ /\'\ \\\|sort) + +" We could omit end of file-entry, there is only one file +" %+I... - include code rating information +" %-G... - remove all remaining report lines from quickfix buffer +CompilerSet efm=%-P[%f],%*\\d\ %t\ %n:%l\\,%c:%m,%Z,%+IYour\ code%m,%Z,%-G%.%# + +""sings +"signs definition +sign define W text=WW texthl=pylint +sign define C text=CC texthl=pylint +sign define R text=RR texthl=pylint +sign define E text=EE texthl=pylint_error + +if g:pylint_onwrite + augroup python + au! + au BufWritePost * call Pylint(1) + augroup end +endif + +if g:pylint_onfly + augroup python + au! + au BufRead * call Pylint(1) + augroup end +endif + +if !exists("*s:Pylint") +function! Pylint(writing) + if has('win32') || has('win16') || has('win95') || has('win64') + setlocal sp=>%s + else + setlocal sp=>%s\ 2>&1 + endif + + " If check is executed by buffer write - do not jump to first error + if !a:writing + silent make + else + silent make! + endif + + if g:pylint_cwindow + cwindow + endif + + call PylintEvaluation() + + if g:pylint_show_rate + echon 'code rate: ' b:pylint_rate ', prev: ' b:pylint_prev_rate + endif + + if g:pylint_signs + call PlacePylintSigns() + endif + + if g:pylint_inline_highlight + call PylintHighlight() + endif + + redraw! + +endfunction +endif + +function! PylintEvaluation() + let l:list = getqflist() + let b:pylint_rate = '0.00' + let b:pylint_prev_rate = '0.00' + for l:item in l:list + if l:item.type == 'I' && l:item.text =~ 'Your code has been rated' + let l:re_rate = '\(-\?[0-9]\{1,2\}\.[0-9]\{2\}\)/' + let b:pylint_rate = substitute(l:item.text, '.*rated at '.l:re_rate.'.*', '\1', 'g') + " Only if there is information about previous run + if l:item.text =~ 'previous run: ' + let b:pylint_prev_rate = substitute(l:item.text, '.*previous run: '.l:re_rate.'.*', '\1', 'g') + endif + endif + endfor +endfunction + +function! PlacePylintSigns() + "in which buffer are we? + "in theory let l:buffr=bufname(l:item.bufnr) + "should work inside the next loop, but i haven't manage to do it + let l:buffr = bufname('%') + "the previous lines are suppose to work, but sometimes it doesn't + if empty(l:buffr) + let l:buffr=bufname(1) + endif + + "first remove all sings + exec('sign unplace *') + "now we place one sign for every quickfix line + let l:list = getqflist() + let l:id = 1 + for l:item in l:list + "the line signs + let l:lnum=item.lnum + let l:type=item.type + "sign place 1 line=l:lnum name=pylint file=l:buffr + if l:type != 'I' + let l:exec = printf('sign place %d name=%s line=%d file=%s', + \ l:id, l:type, l:lnum, l:buffr) + let l:id = l:id + 1 + execute l:exec + endif + endfor + call PylintHighlight() +endfunction + +if !exists("*s:PylintHighlight") + function! PylintHighlight() + highlight link PyError SpellBad + highlight link PyWarning SpellRare + highlight link PyConventions SpellCap + + "clear all already highlighted + if exists("b:cleared") + if b:cleared == 0 + silent call s:ClearHighlight() + let b:cleared = 1 + endif + else + let b:cleared = 1 + endif + + let b:matchedlines = {} + + " get all messages from qicklist + let l:list = getqflist() + for l:item in l:list + " highlight lines with errors (only word characters) without end + " of line + let l:matchDict = {} + let l:matchDict['linenum'] = l:item.lnum + let l:matchDict['message'] = l:item.text + if l:item.type == 'E' + if !has_key(b:matchedlines, l:item.lnum) + let b:matchedlines[l:item.lnum] = l:matchDict + call matchadd("PyError", '\w\%' . l:item.lnum . 'l\n\@!') + endif + elseif item.type == 'W' && g:pylint_warning + if !has_key(b:matchedlines, l:item.lnum) + let b:matchedlines[l:item.lnum] = l:matchDict + call matchadd("PyWarning", '\w\%' . l:item.lnum . 'l\n\@!') + endif + elseif item.type == 'C' && g:pylint_conventions + if !has_key(b:matchedlines, l:item.lnum) + let b:matchedlines[item.lnum] = l:matchDict + call matchadd("PyConventions", '\w\%' . l:item.lnum . 'l\n\@!') + endif + endif + endfor + let b:cleared = 0 + endfunction +endif + +" keep track of whether or not we are showing a message +let b:showing_message = 0 + +" WideMsg() prints [long] message up to (&columns-1) length +" guaranteed without "Press Enter" prompt. +if !exists("*s:WideMsg") + function s:WideMsg(msg) + let x=&ruler | let y=&showcmd + set noruler noshowcmd + redraw + echo a:msg + let &ruler=x | let &showcmd=y + endfun +endif + +if !exists('*s:GetPylintMessage') +function s:GetPylintMessage() + let l:cursorPos = getpos(".") + + " Bail if Pylint hasn't been called yet. + if !exists('b:matchedlines') + return + endif + " if there's a message for the line the cursor is currently on, echo + " it to the console + if has_key(b:matchedlines, l:cursorPos[1]) + let l:pylintMatch = get(b:matchedlines, l:cursorPos[1]) + call s:WideMsg(l:pylintMatch['message']) + let b:showing_message = 1 + return + endif + " otherwise, if we're showing a message, clear it + if b:showing_message == 1 + echo + let b:showing_message = 0 + endif +endfunction +endif + +if !exists('*s:ClearHighlight') + function s:ClearHighlight() + let l:matches = getmatches() + for l:matchId in l:matches + if l:matchId['group'] == 'PyError' || l:matchId['group'] == 'PyWarning' || l:matchId['group'] == 'PyConventions' + call matchdelete(l:matchId['id']) + endif + endfor + let b:matchedlines = {} + let b:cleared = 1 + endfunction +endif diff --git a/.vim/config/settings.vim b/.vim/config/settings.vim new file mode 100644 index 0000000..0457458 --- /dev/null +++ b/.vim/config/settings.vim @@ -0,0 +1,18 @@ +set nocompatible +set number +set relativenumber +set autoindent +syntax on +set hlsearch +set incsearch +set textwidth=79 +set colorcolumn=+2 +let g:table_mode_corner_corner='+' +let g:table_mode_header_fillchar='=' +let g:grammalecte_cli_py='/usr/share/grammalecte-fr/cli.py' +if filereadable(expand("~/.vimrc_background")) + if &t_Co >= 256 + let base16colorspace=256 + endif + source ~/.vimrc_background +endif diff --git a/.vim/pathogen b/.vim/pathogen new file mode 160000 index 0000000..020ab25 --- /dev/null +++ b/.vim/pathogen @@ -0,0 +1 @@ +Subproject commit 020ab25c38f62627c1dab6c7a851176c6ad309f9 diff --git a/.vim/spell/fr.utf-8.add b/.vim/spell/fr.utf-8.add new file mode 100644 index 0000000..a87bf43 --- /dev/null +++ b/.vim/spell/fr.utf-8.add @@ -0,0 +1 @@ +help diff --git a/.vim/spell/fr.utf-8.add.spl b/.vim/spell/fr.utf-8.add.spl new file mode 100644 index 0000000..f5344d3 Binary files /dev/null and b/.vim/spell/fr.utf-8.add.spl differ diff --git a/.vim/spell/fr.utf-8.spl b/.vim/spell/fr.utf-8.spl new file mode 100644 index 0000000..ff27132 Binary files /dev/null and b/.vim/spell/fr.utf-8.spl differ diff --git a/.vim/spell/fr.utf-8.sug b/.vim/spell/fr.utf-8.sug new file mode 100644 index 0000000..df555d2 Binary files /dev/null and b/.vim/spell/fr.utf-8.sug differ diff --git a/.vim/vimrc b/.vim/vimrc new file mode 100644 index 0000000..960df30 --- /dev/null +++ b/.vim/vimrc @@ -0,0 +1,5 @@ +set shell=/bin/bash +call pathogen#infect() +call pathogen#helptags() +runtime! archlinux.vim +runtime! config/**/*.vim diff --git a/.vimrc b/.vimrc new file mode 120000 index 0000000..3f2626c --- /dev/null +++ b/.vimrc @@ -0,0 +1 @@ +.vim/vimrc \ No newline at end of file