Nettoyage configuration vim

This commit is contained in:
Breizh 2022-08-13 00:34:09 +02:00
parent 8ce08fa228
commit 61465dc45a
20 changed files with 205 additions and 454 deletions

View file

@ -64,8 +64,8 @@ ${downspeedgraph enp34s0 25,125}${alignr}${upspeedgraph enp34s0 25,125}
Téléchargé ${totaldown enp34s0}${goto 140}Téléversé ${totalup enp34s0} Téléchargé ${totaldown enp34s0}${goto 140}Téléversé ${totalup enp34s0}
$alignc${addrs enp34s0} $alignc${addrs enp34s0}
$alignc${scroll left 39 2 1 ${v6addrs enp34s0 -n -s}} $alignc${scroll left 39 2 1 ${v6addrs enp34s0 -n -s}}${if_up tun0}
$alignc${curl ifconfig.co/ip}$alignc${curl ip.yunohost.org}${if_up tun0} #$alignc${curl ifconfig.co/ip}$alignc${curl ip.yunohost.org}${if_up tun0}
${color2}${font2}VPN $hr$font$color ${color2}${font2}VPN $hr$font$color
${voffset 2}Téléchargement ${downspeed tun0}${goto 140}Téléversement ${upspeed tun0} ${voffset 2}Téléchargement ${downspeed tun0}${goto 140}Téléversement ${upspeed tun0}
${downspeedgraph tun0 25,125}${alignr}${upspeedgraph tun0 25,125} ${downspeedgraph tun0 25,125}${alignr}${upspeedgraph tun0 25,125}

View file

@ -369,13 +369,13 @@ exec --no-startup-id nm-applet
exec --no-startup-id steam-native -silent -noverifyfiles -language french exec --no-startup-id steam-native -silent -noverifyfiles -language french
#exec --no-startup-id SVPManager #exec --no-startup-id SVPManager
#exec --no-startup-id hp-systray -x #exec --no-startup-id hp-systray -x
exec --no-startup-id play "$HOME/Musique/WELCOME BACK.wav" exec --no-startup-id sleep 5 && play "$HOME/Musique/WELCOME BACK.wav"
exec --no-startup-id variety # exec --no-startup-id variety
# Start i3bar to display a workspace bar (plus the system information i3status if available) # Start i3bar to display a workspace bar (plus the system information i3status if available)
bar { bar {
# position top # position top
status_command i3blocks status_command 2>/tmp/i3blocks.err i3blocks
## please set your primary output first. Example: 'xrandr --output eDP1 --primary' ## please set your primary output first. Example: 'xrandr --output eDP1 --primary'
tray_output primary tray_output primary

View file

@ -31,9 +31,9 @@ markup=pango
#command=echo $(xdotool getactivewindow getwindowname) #command=echo $(xdotool getactivewindow getwindowname)
#interval=1 #interval=1
[empty_block] #[empty_block]
command=echo " " #command=echo " "
interval=once #interval=once
# Generic media player support # Generic media player support
# #

View file

@ -1,4 +1,4 @@
#!/bin/bash #!/bin/bash -x
# Fonction de réinitialisation en cas de perte de la connexion # Fonction de réinitialisation en cas de perte de la connexion
self-reset() { self-reset() {
@ -14,7 +14,7 @@ coproc nc -U /home/breizh/.mpd/socket
IN=${COPROC[1]} IN=${COPROC[1]}
OUT=${COPROC[0]} OUT=${COPROC[0]}
#echo "password xxx" >&${IN} #echo "password xxx" >&${IN}
#sed '/^OK$/q' <&$OUT &>/dev/null sed '/^OK/q' <&$OUT &>/dev/null
# Initialisation des valeurs par défaut et des fonctions # Initialisation des valeurs par défaut et des fonctions
declare -i SCROLL=50 I=0 declare -i SCROLL=50 I=0
@ -58,12 +58,14 @@ do
case $BLOCK_BUTTON in case $BLOCK_BUTTON in
1|3) [[ "${o["state"]}" == stop ]] \ 1|3) [[ "${o["state"]}" == stop ]] \
&& echo "play" >&${IN} \ && echo "play" >&${IN} \
&& sed '/^OK$/q' <&$OUT &>/dev/null ;;& && sed '/^OK$/q' <&$OUT &>/dev/null \
|| self-reset ;;&
2) [[ "${o["state"]}" == stop ]] \ 2) [[ "${o["state"]}" == stop ]] \
&& echo "play" >&${IN} \ && echo "play" >&${IN} \
|| echo "pause" >&${IN} ;;& || echo "pause" >&${IN} \
1) echo "previous" >&${IN} ;;& || self-reset ;;&
3) echo "next" >&${IN} ;;& 1) echo "previous" >&${IN} || self-reset ;;&
3) echo "next" >&${IN} || self-reset ;;&
1|2|3) sed '/^OK$/q' <&$OUT &>/dev/null ;; 1|2|3) sed '/^OK$/q' <&$OUT &>/dev/null ;;
esac esac
@ -72,7 +74,7 @@ do
declare -A o declare -A o
# Récupération de létat # Récupération de létat
echo "status" >&$IN echo "status" >&$IN || self-reset
while read -t 1 -u $OUT output while read -t 1 -u $OUT output
do do
[[ "$output" == "OK" ]] && break [[ "$output" == "OK" ]] && break
@ -80,7 +82,7 @@ do
done done
# Récupération des informations du morceau en cours # Récupération des informations du morceau en cours
echo "currentsong" >&$IN echo "currentsong" >&$IN || self-reset
while read -t 1 -u $OUT output while read -t 1 -u $OUT output
do do
[[ "$output" == "OK" ]] && break [[ "$output" == "OK" ]] && break
@ -102,7 +104,7 @@ do
unset bloc1 bloc2 bloc3 bloc4 unset bloc1 bloc2 bloc3 bloc4
artist="${o["Artist"]:-${o["Name"]}}" artist="${o["Artist"]:-${o["Name"]}}"
song="${o["Title"]}" song="${o["Title"]}"
[[ -z "$artist$song" ]] && song="${o["file"]}" [[ -z "$artist$song" ]] && song="$(basename "${o["file"]}")"
if [[ "$(( ${#song} + ${#artist} + 1 ))" -gt "$SCROLL" ]] if [[ "$(( ${#song} + ${#artist} + 1 ))" -gt "$SCROLL" ]]
then then
@ -159,4 +161,4 @@ do
# DEBUG # DEBUG
printf '<b>%s</b>%s<b>%s</b>%s%s\n' "$bloc1" "$bloc2" "$bloc3" "$bloc4" " $status$time</span>" printf '<b>%s</b>%s<b>%s</b>%s%s\n' "$bloc1" "$bloc2" "$bloc3" "$bloc4" " $status$time</span>"
done done
done

View file

@ -1,6 +1,9 @@
#!/bin/bash #!/bin/bash -e
feh --no-fehbg --bg-fill /tmp/output.png if [[ -f /tmp/output.png ]]
then
feh --no-fehbg --bg-center /tmp/output.png
fi
cd ~/Images/clocks/Traveler/ cd ~/Images/clocks/Traveler/

View file

@ -1 +0,0 @@
../pathogen/autoload/pathogen.vim

@ -1 +0,0 @@
Subproject commit fcce6bce6a2f4b14eea7ea388031c0aa65e4b67d

@ -1 +0,0 @@
Subproject commit 2a6155a255e83bb930da2627dce4259a3fe4ce3a

@ -1 +0,0 @@
Subproject commit 1bc04a5b146fa52ff94dac9ce5c5800e051a9b0b

@ -1 +0,0 @@
Subproject commit 934cec007c0e7b380603bce99b6139a894105252

@ -1 +0,0 @@
Subproject commit a93ee1b7a4dadb82ca7ba793faf3047f6f6863d7

@ -1 +0,0 @@
Subproject commit 3fe6db25bf03b16e87a162172dd3f908be7d028d

@ -1 +0,0 @@
Subproject commit 855c30915547c7e9c19b7e6efb528730c071d2e8

@ -1 +0,0 @@
Subproject commit eb9483c32f4e73452be2f18be21f7060f4e28c96

@ -1 +0,0 @@
Subproject commit 5483e163bd0a67e729e0e8436315f33f9e126baf

View file

@ -8,55 +8,93 @@
" :colorscheme works in terminals supported by base16-shell scripts " :colorscheme works in terminals supported by base16-shell scripts
" User must set this variable in .vimrc " User must set this variable in .vimrc
" let g:base16_shell_path=base16-builder/output/shell/ " let g:base16_shell_path=base16-builder/output/shell/
if !has('gui_running') if !has("gui_running")
if exists("g:base16_shell_path") if exists("g:base16_shell_path")
execute "silent !/bin/sh ".g:base16_shell_path."/base16-eighties.sh" execute "silent !/bin/sh ".g:base16_shell_path."/base16-eighties.sh"
endif endif
endif endif
" GUI color definitions " GUI color definitions
let s:gui00 = "2d2d2d" let s:gui00 = "2d2d2d"
let s:gui01 = "393939" let g:base16_gui00 = "2d2d2d"
let s:gui02 = "515151" let s:gui01 = "393939"
let s:gui03 = "747369" let g:base16_gui01 = "393939"
let s:gui04 = "a09f93" let s:gui02 = "515151"
let s:gui05 = "d3d0c8" let g:base16_gui02 = "515151"
let s:gui06 = "e8e6df" let s:gui03 = "747369"
let s:gui07 = "f2f0ec" let g:base16_gui03 = "747369"
let s:gui08 = "f2777a" let s:gui04 = "a09f93"
let s:gui09 = "f99157" let g:base16_gui04 = "a09f93"
let s:gui0A = "ffcc66" let s:gui05 = "d3d0c8"
let s:gui0B = "99cc99" let g:base16_gui05 = "d3d0c8"
let s:gui0C = "66cccc" let s:gui06 = "e8e6df"
let s:gui0D = "6699cc" let g:base16_gui06 = "e8e6df"
let s:gui0E = "cc99cc" let s:gui07 = "f2f0ec"
let s:gui0F = "d27b53" let g:base16_gui07 = "f2f0ec"
let s:gui08 = "f2777a"
let g:base16_gui08 = "f2777a"
let s:gui09 = "f99157"
let g:base16_gui09 = "f99157"
let s:gui0A = "ffcc66"
let g:base16_gui0A = "ffcc66"
let s:gui0B = "99cc99"
let g:base16_gui0B = "99cc99"
let s:gui0C = "66cccc"
let g:base16_gui0C = "66cccc"
let s:gui0D = "6699cc"
let g:base16_gui0D = "6699cc"
let s:gui0E = "cc99cc"
let g:base16_gui0E = "cc99cc"
let s:gui0F = "d27b53"
let g:base16_gui0F = "d27b53"
" Terminal color definitions " Terminal color definitions
let s:cterm00 = "00" let s:cterm00 = "00"
let s:cterm03 = "08" let g:base16_cterm00 = "00"
let s:cterm05 = "07" let s:cterm03 = "08"
let s:cterm07 = "15" let g:base16_cterm03 = "08"
let s:cterm08 = "01" let s:cterm05 = "07"
let s:cterm0A = "03" let g:base16_cterm05 = "07"
let s:cterm0B = "02" let s:cterm07 = "15"
let s:cterm0C = "06" let g:base16_cterm07 = "15"
let s:cterm0D = "04" let s:cterm08 = "01"
let s:cterm0E = "05" let g:base16_cterm08 = "01"
if exists('base16colorspace') && base16colorspace == "256" let s:cterm0A = "03"
let s:cterm01 = "18" let g:base16_cterm0A = "03"
let s:cterm02 = "19" let s:cterm0B = "02"
let s:cterm04 = "20" let g:base16_cterm0B = "02"
let s:cterm06 = "21" let s:cterm0C = "06"
let s:cterm09 = "16" let g:base16_cterm0C = "06"
let s:cterm0F = "17" let s:cterm0D = "04"
let g:base16_cterm0D = "04"
let s:cterm0E = "05"
let g:base16_cterm0E = "05"
if exists("base16colorspace") && base16colorspace == "256"
let s:cterm01 = "18"
let g:base16_cterm01 = "18"
let s:cterm02 = "19"
let g:base16_cterm02 = "19"
let s:cterm04 = "20"
let g:base16_cterm04 = "20"
let s:cterm06 = "21"
let g:base16_cterm06 = "21"
let s:cterm09 = "16"
let g:base16_cterm09 = "16"
let s:cterm0F = "17"
let g:base16_cterm0F = "17"
else else
let s:cterm01 = "10" let s:cterm01 = "10"
let s:cterm02 = "11" let g:base16_cterm01 = "10"
let s:cterm04 = "12" let s:cterm02 = "11"
let s:cterm06 = "13" let g:base16_cterm02 = "11"
let s:cterm09 = "09" let s:cterm04 = "12"
let s:cterm0F = "14" let g:base16_cterm04 = "12"
let s:cterm06 = "13"
let g:base16_cterm06 = "13"
let s:cterm09 = "09"
let g:base16_cterm09 = "09"
let s:cterm0F = "14"
let g:base16_cterm0F = "14"
endif endif
" Neovim terminal colours " Neovim terminal colours
@ -70,19 +108,38 @@ if has("nvim")
let g:terminal_color_6 = "#66cccc" let g:terminal_color_6 = "#66cccc"
let g:terminal_color_7 = "#d3d0c8" let g:terminal_color_7 = "#d3d0c8"
let g:terminal_color_8 = "#747369" let g:terminal_color_8 = "#747369"
let g:terminal_color_9 = "#f99157" let g:terminal_color_9 = "#f2777a"
let g:terminal_color_10 = "#393939" let g:terminal_color_10 = "#99cc99"
let g:terminal_color_11 = "#515151" let g:terminal_color_11 = "#ffcc66"
let g:terminal_color_12 = "#a09f93" let g:terminal_color_12 = "#6699cc"
let g:terminal_color_13 = "#e8e6df" let g:terminal_color_13 = "#cc99cc"
let g:terminal_color_14 = "#d27b53" let g:terminal_color_14 = "#66cccc"
let g:terminal_color_15 = "#f2f0ec" let g:terminal_color_15 = "#f2f0ec"
let g:terminal_color_background = g:terminal_color_0 let g:terminal_color_background = g:terminal_color_0
let g:terminal_color_foreground = g:terminal_color_7 let g:terminal_color_foreground = g:terminal_color_5
if &background == "light" if &background == "light"
let g:terminal_color_background = g:terminal_color_7 let g:terminal_color_background = g:terminal_color_7
let g:terminal_color_foreground = g:terminal_color_2 let g:terminal_color_foreground = g:terminal_color_2
endif endif
elseif has("terminal")
let g:terminal_ansi_colors = [
\ "#2d2d2d",
\ "#f2777a",
\ "#99cc99",
\ "#ffcc66",
\ "#6699cc",
\ "#cc99cc",
\ "#66cccc",
\ "#d3d0c8",
\ "#747369",
\ "#f2777a",
\ "#99cc99",
\ "#ffcc66",
\ "#6699cc",
\ "#cc99cc",
\ "#66cccc",
\ "#f2f0ec",
\ ]
endif endif
" Theme setup " Theme setup
@ -91,7 +148,11 @@ syntax reset
let g:colors_name = "base16-eighties" let g:colors_name = "base16-eighties"
" Highlighting function " Highlighting function
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp) " Optional variables are attributes and guisp
function! g:Base16hi(group, guifg, guibg, ctermfg, ctermbg, ...)
let l:attr = get(a:, 1, "")
let l:guisp = get(a:, 2, "")
if a:guifg != "" if a:guifg != ""
exec "hi " . a:group . " guifg=#" . a:guifg exec "hi " . a:group . " guifg=#" . a:guifg
endif endif
@ -104,15 +165,21 @@ fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:ctermbg != "" if a:ctermbg != ""
exec "hi " . a:group . " ctermbg=" . a:ctermbg exec "hi " . a:group . " ctermbg=" . a:ctermbg
endif endif
if a:attr != "" if l:attr != ""
exec "hi " . a:group . " gui=" . a:attr . " cterm=" . a:attr exec "hi " . a:group . " gui=" . l:attr . " cterm=" . l:attr
endif endif
if a:guisp != "" if l:guisp != ""
exec "hi " . a:group . " guisp=#" . a:guisp exec "hi " . a:group . " guisp=#" . l:guisp
endif endif
endfunction
fun <sid>hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
call g:Base16hi(a:group, a:guifg, a:guibg, a:ctermfg, a:ctermbg, a:attr, a:guisp)
endfun endfun
" Vim editor colors " Vim editor colors
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("Bold", "", "", "", "", "bold", "") call <sid>hi("Bold", "", "", "", "", "bold", "")
call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "") call <sid>hi("Debug", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "") call <sid>hi("Directory", s:gui0D, "", s:cterm0D, "", "", "")
@ -128,7 +195,8 @@ call <sid>hi("MatchParen", "", s:gui03, "", s:cterm03, "", "")
call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "") call <sid>hi("ModeMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "") call <sid>hi("MoreMsg", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "") call <sid>hi("Question", s:gui0D, "", s:cterm0D, "", "", "")
call <sid>hi("Search", s:gui03, s:gui0A, s:cterm03, s:cterm0A, "", "") call <sid>hi("Search", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "", "")
call <sid>hi("Substitute", s:gui01, s:gui0A, s:cterm01, s:cterm0A, "none", "")
call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "") call <sid>hi("SpecialKey", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "") call <sid>hi("TooLong", s:gui08, "", s:cterm08, "", "", "")
call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "") call <sid>hi("Underlined", s:gui08, "", s:cterm08, "", "", "")
@ -140,7 +208,6 @@ call <sid>hi("Title", s:gui0D, "", s:cterm0D, "", "none", "")
call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "") call <sid>hi("Conceal", s:gui0D, s:gui00, s:cterm0D, s:cterm00, "", "")
call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "") call <sid>hi("Cursor", s:gui00, s:gui05, s:cterm00, s:cterm05, "", "")
call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "") call <sid>hi("NonText", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("Normal", s:gui05, s:gui00, s:cterm05, s:cterm00, "", "")
call <sid>hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") call <sid>hi("LineNr", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "") call <sid>hi("SignColumn", s:gui03, s:gui01, s:cterm03, s:cterm01, "", "")
call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "") call <sid>hi("StatusLine", s:gui04, s:gui02, s:cterm04, s:cterm02, "none", "")
@ -150,8 +217,9 @@ call <sid>hi("ColorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "") call <sid>hi("CursorColumn", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "") call <sid>hi("CursorLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("CursorLineNr", s:gui04, s:gui01, s:cterm04, s:cterm01, "", "") call <sid>hi("CursorLineNr", s:gui04, s:gui01, s:cterm04, s:cterm01, "", "")
call <sid>hi("PMenu", s:gui04, s:gui01, s:cterm04, s:cterm01, "none", "") call <sid>hi("QuickFixLine", "", s:gui01, "", s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui04, s:cterm01, s:cterm04, "", "") call <sid>hi("PMenu", s:gui05, s:gui01, s:cterm05, s:cterm01, "none", "")
call <sid>hi("PMenuSel", s:gui01, s:gui05, s:cterm01, s:cterm05, "", "")
call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") call <sid>hi("TabLine", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "") call <sid>hi("TabLineFill", s:gui03, s:gui01, s:cterm03, s:cterm01, "none", "")
call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "") call <sid>hi("TabLineSel", s:gui0B, s:gui01, s:cterm0B, s:cterm01, "none", "")
@ -288,10 +356,13 @@ call <sid>hi("NERDTreeExecFile", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "") call <sid>hi("phpMemberSelector", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "") call <sid>hi("phpComparison", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "") call <sid>hi("phpParent", s:gui05, "", s:cterm05, "", "", "")
call <sid>hi("phpMethodsVar", s:gui0C, "", s:cterm0C, "", "", "")
" Python highlighting " Python highlighting
call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "") call <sid>hi("pythonOperator", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "") call <sid>hi("pythonRepeat", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonInclude", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("pythonStatement", s:gui0E, "", s:cterm0E, "", "", "")
" Ruby highlighting " Ruby highlighting
call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "") call <sid>hi("rubyAttribute", s:gui0D, "", s:cterm0D, "", "", "")
@ -314,10 +385,25 @@ call <sid>hi("SignifySignChange", s:gui0D, s:gui01, s:cterm0D, s:cterm01, "", "
call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "") call <sid>hi("SignifySignDelete", s:gui08, s:gui01, s:cterm08, s:cterm01, "", "")
" Spelling highlighting " Spelling highlighting
call <sid>hi("SpellBad", "", s:gui00, "", s:cterm00, "undercurl", s:gui08) call <sid>hi("SpellBad", "", "", "", "", "undercurl", s:gui08)
call <sid>hi("SpellLocal", "", s:gui00, "", s:cterm00, "undercurl", s:gui0C) call <sid>hi("SpellLocal", "", "", "", "", "undercurl", s:gui0C)
call <sid>hi("SpellCap", "", s:gui00, "", s:cterm00, "undercurl", s:gui0D) call <sid>hi("SpellCap", "", "", "", "", "undercurl", s:gui0D)
call <sid>hi("SpellRare", "", s:gui00, "", s:cterm00, "undercurl", s:gui0E) call <sid>hi("SpellRare", "", "", "", "", "undercurl", s:gui0E)
" Startify highlighting
call <sid>hi("StartifyBracket", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("StartifyFile", s:gui07, "", s:cterm07, "", "", "")
call <sid>hi("StartifyFooter", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("StartifyHeader", s:gui0B, "", s:cterm0B, "", "", "")
call <sid>hi("StartifyNumber", s:gui09, "", s:cterm09, "", "", "")
call <sid>hi("StartifyPath", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("StartifySection", s:gui0E, "", s:cterm0E, "", "", "")
call <sid>hi("StartifySelect", s:gui0C, "", s:cterm0C, "", "", "")
call <sid>hi("StartifySlash", s:gui03, "", s:cterm03, "", "", "")
call <sid>hi("StartifySpecial", s:gui03, "", s:cterm03, "", "", "")
" Java highlighting
call <sid>hi("javaOperator", s:gui0D, "", s:cterm0D, "", "", "")
" Remove functions " Remove functions
delf <sid>hi delf <sid>hi

View file

@ -1,322 +0,0 @@
" Vim compiler file for Python
" Compiler: Style checking tool for Python
" Maintainer: Cong Ma <cma@pmo.ac.cn>
" 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 <args>
endif
au CursorHold <buffer> call s:GetPylintMessage()
au CursorMoved <buffer> 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

View file

@ -1,36 +0,0 @@
set nocompatible
set lazyredraw
set number
set relativenumber
set autoindent
syntax on
set hlsearch
set incsearch
set textwidth=79
set colorcolumn=+2
nnoremap <F3> :set hlsearch!<CR>
let g:vimtex_view_method = 'zathura'
let g:table_mode_corner='|'
let g:grammalecte_cli_py='/usr/bin/grammalecte-cli.py'
if filereadable(expand("~/.vimrc_background"))
if &t_Co >= 256
let base16colorspace=256
source ~/.vimrc_background
hi Normal guibg=NONE ctermbg=NONE
elseif has("gui_running")
source ~/.vimrc_background
"set guifont=xos4\ Terminus
set guifont=IBM\ Plex\ Mono\ 10
else
colorscheme default
endif
endif
"nnoremap j jzz
"nnoremap k kzz
"nnoremap <Down> jzz
"nnoremap <Up> kzz
"set scrolloff=999
let g:livepreview_previewer = 'zathura'
let g:livepreview_engine = 'pdflatex' . ' -interaction=nonstopmode --shell-escape'
cmap w!! w !sudo tee > /dev/null %
"set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab

@ -1 +0,0 @@
Subproject commit 06da921608b971fb47603671bcafdb2843992eb3

View file

@ -1,5 +1,34 @@
set shell=/bin/bash set nocompatible
execute pathogen#infect() set lazyredraw
call pathogen#helptags() set number
runtime! archlinux.vim set relativenumber
runtime! config/**/*.vim set autoindent
syntax on
set hlsearch
set incsearch
set textwidth=79
set colorcolumn=+2
nnoremap <F3> :set hlsearch!<CR>
let g:vimtex_view_method = 'zathura'
let g:table_mode_corner='|'
let g:grammalecte_cli_py='/usr/bin/grammalecte-cli.py'
if filereadable(expand("~/.vimrc_background"))
if &t_Co >= 256
let base16colorspace=256
source ~/.vimrc_background
hi Normal guibg=NONE ctermbg=NONE
elseif has("gui_running")
source ~/.vimrc_background
"set guifont=xos4\ Terminus
set guifont=IBM\ Plex\ Mono\ 10
else
colorscheme default
endif
endif
"nnoremap j jzz
"nnoremap k kzz
"nnoremap <Down> jzz
"nnoremap <Up> kzz
set scrolloff=999
cmap w!! w !sudo tee > /dev/null %
set tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab