From 1806b1b40739894ee18bef2c071487274cbab3b7 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Fri, 28 Feb 2020 14:21:36 +0100 Subject: Small fixes and adoptions for python[23] --- after/ftplugin/python.vim | 10 ++++++++++ ftplugin/python.vim | 1 + ftplugin/text.vim | 2 +- plugin/max-fix-colorschemes.vim | 7 +++++-- utils/Xresources | 2 +- utils/default-font.conf | 21 +++++++++++++-------- utils/gtkrc-2.0 | 1 + vimrc | 4 +++- vimrc-common | 6 +++--- 9 files changed, 38 insertions(+), 16 deletions(-) create mode 100644 after/ftplugin/python.vim create mode 100644 ftplugin/python.vim create mode 100644 utils/gtkrc-2.0 diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim new file mode 100644 index 0000000..642e1c0 --- /dev/null +++ b/after/ftplugin/python.vim @@ -0,0 +1,10 @@ +python3 << EOF +import os +import sys +import vim +for p in sys.path: + # Add each directory in sys.path, if it exists. + if os.path.isdir(p): + # Command 'set' needs backslash before each space. + vim.command(r"set path+=%s" % (p.replace(" ", r"\ "))) +EOF diff --git a/ftplugin/python.vim b/ftplugin/python.vim new file mode 100644 index 0000000..1268957 --- /dev/null +++ b/ftplugin/python.vim @@ -0,0 +1 @@ +let &path=system('python -c "import sys; print(\",\".join(sys.path))"') diff --git a/ftplugin/text.vim b/ftplugin/text.vim index 0336a13..9097834 100644 --- a/ftplugin/text.vim +++ b/ftplugin/text.vim @@ -6,7 +6,7 @@ set autoindent nosmartindent nocindent set formatoptions+=n " When formatting text, recognize numbered lists. set formatoptions+=1 " do not break after a one letter word -set formatoptions+=p " Don't break lines at single spaces that follow periods. +" set formatoptions+=p " Don't break lines at single spaces that follow periods. set formatoptions+=aw " Automatic formatting of paragraphs (w=only if space in the end) diff --git a/plugin/max-fix-colorschemes.vim b/plugin/max-fix-colorschemes.vim index 1535dc7..b9c7657 100644 --- a/plugin/max-fix-colorschemes.vim +++ b/plugin/max-fix-colorschemes.vim @@ -24,8 +24,8 @@ function! ExtendColorTheme() highlight! link Tabline StatusLine highlight! link VertSplit LineNr highlight! link SignColumn LineNr - highlight! link FoldColumn LineNr - highlight! link Folded LineNr + highlight! link FoldColumn VertSplit + " highlight! link Folded LineNr highlight! link EndOfBuffer LineNr endfunction autocmd ColorScheme * call ExtendColorTheme() @@ -45,6 +45,9 @@ else \ 'theme': { \ 'default.dark': { \ 'transparent_background': 1 + \ }, + \ 'default.light': { + \ 'transparent_background': 1 \ } \ } \ } diff --git a/utils/Xresources b/utils/Xresources index f536483..5723999 100644 --- a/utils/Xresources +++ b/utils/Xresources @@ -1,6 +1,6 @@ ! #include "/home/max/.config/base16-xresources/xresources/base16-tomorrow-night.Xresources" ! #include "/home/max/.config/base16-xresources/xresources/base16-google-light.Xresources" -#include "/home/max/.config/base16-xresources/xresources/base16-tomorrow.Xresources" +#include "/home/max/.local/share/base16/base16-xresources/xresources/base16-tomorrow.Xresources" urxvt.scrollBar: false urxvt.background: base00 diff --git a/utils/default-font.conf b/utils/default-font.conf index 3992d07..cf01d6d 100644 --- a/utils/default-font.conf +++ b/utils/default-font.conf @@ -2,21 +2,26 @@ <!-- this is a configuration file for fontconfig and should be copied or linked to ~/.config/fontconfig/conf.d/ --> <!DOCTYPE fontconfig SYSTEM "/etc/fonts/fonts.dtd"> <fontconfig> + <match target="pattern"> + <test qual="any" name="family"><string>monospace</string></test> + <edit mode="prepend" name="family"><string>Hack Nerd Font Mono</string></edit> + <edit mode="prepend" name="family"><string>Hack</string></edit> + <edit mode="prepend" name="family"><string>emoji</string></edit> + <edit mode="prepend" name="family"><string>emojione</string></edit> + <edit mode="prepend" name="family"><string>FuraCode Nerd Font Mono Medium</string></edit> + <test name="slant" compare="not_eq"><const>italic</const></test> + <edit mode="assign" name="style"><string>bold</string></edit> + </match> <match target="pattern"> <test qual="any" name="family"><string>serif</string></test> - <edit name="family" mode="assign" binding="same"><string>Noto Serif</string></edit> + <edit name="family" mode="prepend" binding="same"><string>Noto Serif</string></edit> </match> <match target="pattern"> <test qual="any" name="family"><string>sans-serif</string></test> - <edit name="family" mode="assign" binding="same"><string>Noto Sans</string></edit> + <edit name="family" mode="prepend" binding="same"><string>Noto Sans</string></edit> </match> <match target="pattern"> - <test qual="any" name="family"><string>monospace</string></test> - <edit mode="assign" name="family"><string>Hack</string></edit> - <edit mode="prepend" name="family"><string>emoji</string></edit> - - <test name="slant" compare="not_eq"><const>italic</const></test> - <edit mode="assign" name="style"><string>bold</string></edit> + <edit name="dpi" mode="assign"><double>102</double></edit> </match> </fontconfig> <!-- diff --git a/utils/gtkrc-2.0 b/utils/gtkrc-2.0 new file mode 100644 index 0000000..05caadc --- /dev/null +++ b/utils/gtkrc-2.0 @@ -0,0 +1 @@ +gtk-icon-theme-name="gnome" diff --git a/vimrc b/vimrc index cc4cae8..058a66b 100644 --- a/vimrc +++ b/vimrc @@ -9,7 +9,9 @@ set ttyfast | " improves speed for terminal vim (incompatible with nvim) set nottybuiltin | " use external termcaps set restorescreen | " restores the console after exiting vim (intentionally not in nvim) -autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") +" autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib") +" autocmd VimLeave * call system("xsel -ib", getreg('+')) +autocmd VimLeave * call system('echo ' . shellescape(getreg('+')) . ' | xclip -selection clipboard') " scripts from the default vim installation, which do not get loaded by default, but are useful. diff --git a/vimrc-common b/vimrc-common index 44dea70..6415842 100644 --- a/vimrc-common +++ b/vimrc-common @@ -80,7 +80,7 @@ if has("multi_byte") set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars) " set listchars+=eol:↲ | " symbols used when using :set list (which displays non-printable chars) " set listchars+=space:· | " symbols used when using :set list (which displays non-printable chars) - set showbreak+=› | " symbol used in the beginning of a wrapped line + "set showbreak+=› | " symbol used in the beginning of a wrapped line " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective) set nolist @@ -223,8 +223,8 @@ if has("autocmd") let g:html_indent_script1 = "inc" let g:html_indent_style1 = "inc" - let g:loaded_ruby_provider = 1 " disable ruby support - let g:loaded_python_provider = 1 " disable python 3 + " let g:loaded_ruby_provider = 1 " disable ruby support + " let g:loaded_python_provider = 1 " disable python 3 let g:LatexBox_latexmk_preview_continuously = 1 let g:LatexBox_viewer = "evince" -- cgit v1.2.3