From bd4fa1331b6543ddee67324ade50419f2c036105 Mon Sep 17 00:00:00 2001
From: Max Christian Pohle
Date: Mon, 7 Oct 2019 23:55:10 +0200
Subject: further C&P and keyboard arrow fixes

---
 ftplugin/c.vim                  |  5 +++
 plugin/KarlMarks.vim            |  3 +-
 plugin/max-fix-colorschemes.vim |  5 +--
 utils/default-font.conf         | 69 +++++++++++++++++++----------------------
 vimrc                           |  2 --
 vimrc-common                    | 11 +++++++
 6 files changed, 53 insertions(+), 42 deletions(-)

diff --git a/ftplugin/c.vim b/ftplugin/c.vim
index 3a874ff..96251d9 100644
--- a/ftplugin/c.vim
+++ b/ftplugin/c.vim
@@ -7,3 +7,8 @@ map <buffer> = :pyf /usr/share/clang/clang-format.py<CR>
 
 let c_space_errors=1
 let c_gnu=1
+
+
+hi! cConstant gui=italic
+hi! cConditional gui=italic
+hi! cInclude gui=italic
diff --git a/plugin/KarlMarks.vim b/plugin/KarlMarks.vim
index 6e5a408..3340dad 100644
--- a/plugin/KarlMarks.vim
+++ b/plugin/KarlMarks.vim
@@ -2,6 +2,7 @@ let g:markerbar_additional =   '"'   " position in buffer when left
 let g:markerbar_additional .=  '<>'  " start/end last selection
 let g:markerbar_additional .=  '{}'  " start/end paragraph
 let g:markerbar_additional .=  '()'  " start/end sentence
+let g:markerbar_additional .=  '[]'  " start/end sentence
 let g:markerbar_additional .=  '.'   " last change
 let g:markerbar_additional .=  "^"   " insert mode stopped
 let g:markerbar_additional .=  "'`"
@@ -25,4 +26,4 @@ endfunction
 autocmd CursorHold * call KarlMarks()
 
 " important for distraction free reading while changing windows
-set signcolumn=yes
+" setlocal signcolumn=yes
diff --git a/plugin/max-fix-colorschemes.vim b/plugin/max-fix-colorschemes.vim
index c357117..96b57e2 100644
--- a/plugin/max-fix-colorschemes.vim
+++ b/plugin/max-fix-colorschemes.vim
@@ -19,7 +19,8 @@ function! ExtendColorTheme()
     highlight! Error          ctermbg=NONE               cterm=NONE            gui=NONE            guibg=NONE
     highlight! SpellBad                                  cterm=NONE            gui=undercurl       guibg=NONE guifg=red
     highlight! Ignore         ctermbg=NONE ctermfg=NONE  cterm=NONE            gui=NONE            guibg=NONE guifg=NONE
-    
+    highlight! LineNr                                    cterm=italic          gui=italic
+
     if has("gui_running")
         highlight invisible gui=NONE guifg=background guibg=background
     else
@@ -62,7 +63,7 @@ else
     let g:PaperColor_Theme_Options = {
                 \   'theme': {
                 \     'default': {
-                \       'transparent_background': 0
+                \       'transparent_background': 1
                 \     }
                 \   }
                 \ }
diff --git a/utils/default-font.conf b/utils/default-font.conf
index b5bb196..3992d07 100644
--- a/utils/default-font.conf
+++ b/utils/default-font.conf
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!-- this is a configuration file for fontconfig and should be copied or linked to ~/.config/fontconfig/conf.d/ -->
-<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
+<!DOCTYPE fontconfig SYSTEM "/etc/fonts/fonts.dtd">
 <fontconfig>
     <match target="pattern">
         <test qual="any" name="family"><string>serif</string></test>
@@ -12,42 +12,37 @@
     </match>
     <match target="pattern">
         <test qual="any" name="family"><string>monospace</string></test>
-        <!--
-            <edit mode="assign" name="embolden">
-            <bool>true</bool>
-            </edit>
-        -->
-        <edit mode="assign" name="style"><string>Bold</string></edit>
         <edit mode="assign" name="family"><string>Hack</string></edit>
-        <edit mode="prepend" name="family"><string>PowerlineSymbols</string></edit>
-        <edit mode="prepend" name="family"><string>Noto Color Emoji</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>
     </match>
 </fontconfig>
-
-<!--
-	family: "Anonymous Pro for Powerline"(s)
-	family: "Consolas for Powerline"(s) "Consolas for Powerline FixedD"(s)
-	family: "DejaVu Sans Mono for Powerline"(s)
-	family: "Droid Sans Mono for Powerline"(s)
-	family: "Inconsolata for Powerline"(s)
-	family: "Inconsolata-dz for Powerline"(s)
-	family: "Liberation Mono for Powerline"(s)
-	family: "Menlo for Powerline"(s)
-	family: "Meslo LG L DZ for Powerline"(s)
-	family: "Meslo LG L for Powerline"(s)
-	family: "Meslo LG M DZ for Powerline"(s)
-	family: "Meslo LG M for Powerline"(s)
-	family: "Meslo LG S DZ for Powerline"(s)
-	family: "Meslo LG S for Powerline"(s)
-	family: "PowerlineSymbols"(s)
-	family: "Source Code Pro for Powerline"(s)
-	family: "Source Code Pro for Powerline"(s) "Source Code Pro Black"(s)
-	family: "Source Code Pro for Powerline"(s) "Source Code Pro ExtraLight"(s)
-	family: "Source Code Pro for Powerline"(s) "Source Code Pro Light"(s)
-	family: "Source Code Pro for Powerline"(s) "Source Code Pro Medium"(s)
-	family: "Source Code Pro for Powerline"(s) "Source Code Pro Semibold"(s)
-	family: "Terminus for Powerline"(s)
-	family: "Ubuntu Mono derivative Powerline"(s)
-	family: "xos4 Terminess Powerline"(s)
-	family: "xos4 Terminus for Powerline"(s)
--->
+    <!--
+        family: "Anonymous Pro for Powerline"(s)
+        family: "Consolas for Powerline"(s) "Consolas for Powerline FixedD"(s)
+        family: "DejaVu Sans Mono for Powerline"(s)
+        family: "Droid Sans Mono for Powerline"(s)
+        family: "Inconsolata for Powerline"(s)
+        family: "Inconsolata-dz for Powerline"(s)
+        family: "Liberation Mono for Powerline"(s)
+        family: "Menlo for Powerline"(s)
+        family: "Meslo LG L DZ for Powerline"(s)
+        family: "Meslo LG L for Powerline"(s)
+        family: "Meslo LG M DZ for Powerline"(s)
+        family: "Meslo LG M for Powerline"(s)
+        family: "Meslo LG S DZ for Powerline"(s)
+        family: "Meslo LG S for Powerline"(s)
+        family: "PowerlineSymbols"(s)
+        family: "Source Code Pro for Powerline"(s)
+        family: "Source Code Pro for Powerline"(s) "Source Code Pro Black"(s)
+        family: "Source Code Pro for Powerline"(s) "Source Code Pro ExtraLight"(s)
+        family: "Source Code Pro for Powerline"(s) "Source Code Pro Light"(s)
+        family: "Source Code Pro for Powerline"(s) "Source Code Pro Medium"(s)
+        family: "Source Code Pro for Powerline"(s) "Source Code Pro Semibold"(s)
+        family: "Terminus for Powerline"(s)
+        family: "Ubuntu Mono derivative Powerline"(s)
+        family: "xos4 Terminess Powerline"(s)
+        family: "xos4 Terminus for Powerline"(s)
+    -->
diff --git a/vimrc b/vimrc
index 6f80d2f..cc4cae8 100644
--- a/vimrc
+++ b/vimrc
@@ -12,8 +12,6 @@ set restorescreen   | " restores the console after exiting vim (intentionally no
 autocmd VimLeave * call system("echo -n $'" . escape(getreg(), "'") . "' | xsel -ib")
 
 
-xnoremap "+y y:call system("wl-copy", @")<cr>
-
 " scripts from the default vim installation, which do not get loaded by default, but are useful.
 if filereadable($VIMRUNTIME.'/macros/editexisting.vim')
     packadd! editexisting
diff --git a/vimrc-common b/vimrc-common
index b8900c4..4b00369 100644
--- a/vimrc-common
+++ b/vimrc-common
@@ -333,6 +333,12 @@ augroup KEYBOARD_MAPPING
   nnoremap <s-up>    vk
   vnoremap <s-up>    k
 
+  " if the wildmenu is configured to to display suggestions vertically, then
+  " reconfigure the cursor keys to work in that direction
+  if &wildoptions =~# 'pum'
+    cnoremap <expr> <up>   pumvisible() ? "<C-p>" : "\<up>"
+    cnoremap <expr> <down> pumvisible() ? "<C-n>" : "\<down>"
+  endif
 
 
   " INSERT_MODE_MAPPINGS:
@@ -344,6 +350,11 @@ augroup KEYBOARD_MAPPING
   if has('nvim') " only neovim...
     " shortcut \t opens a terminal in a horizontal split
     nnoremap <leader>t :new +terminal<CR>
+  else
+    " allow vim to yank in wayland
+    if $XDG_SESSION_TYPE ==# 'wayland'
+      xnoremap "+y y:call system("wl-copy", @")<cr>
+    endif 
   endif
 augroup END
 
-- 
cgit v1.2.3