From eec48ff71881d8757b79dcd95aac9dac4d71bf72 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sun, 12 May 2024 21:01:00 +0200 Subject: tidied this repo up and uploaded my new nvim from scratch config --- README.md | 298 ++++++++++++++++++++ after/ftdetect/log.vim | 0 after/ftplugin/javascript.vim | 1 - after/ftplugin/python.vim | 0 after/indent/html5.vim | 0 after/indent/php.vim | 0 after/indent/yaml.vim | 0 after/syntax/c.vim | 0 after/syntax/log.vim | 0 after/syntax/markdown.vim | 0 doc/coderonline-vim.png | Bin 91868 -> 0 bytes doc/git | 2 - doc/git.txt | 3 - doc/gtk.css | 7 - doc/list-of-filetypes.txt | 175 ------------ doc/readme.md | 15 - doc/screen.txt | 9 - doc/shortcuts.txt | 206 -------------- gvimrc | 2 + init-mini.lua | 90 ++++++ init.lua | 308 +++++++++++++-------- pack/all/start/fzf | 1 - pack/all/start/fzf.vim | 1 - pack/all/start/vim-colorscheme-papercolor | 1 - pack/all/start/vim-editorconfig | 1 - pack/all/start/vim-fancy-line | 1 - pack/all/start/vim-karlmarks | 1 - pack/all/start/vim-mercenary | 1 - pack/all/start/vim-recently-used | 1 - pack/all/start/vim-under-the-cursor | 1 - pack/nvim/start/nvim-cmp | 1 - pack/nvim/start/nvim-cmp-buffer | 1 - pack/nvim/start/nvim-cmp-lsp-signature-help | 1 - pack/nvim/start/nvim-cmp-nvim-lsp | 1 - pack/nvim/start/nvim-colorizer | 1 - pack/nvim/start/nvim-lsp | 1 - pack/nvim/start/nvim-lspconfig | 1 - pack/nvim/start/nvim-lua-language-server | 1 - pack/nvim/start/nvim-plenary | 1 - pack/nvim/start/nvim-telescope | 1 - pack/nvim/start/nvim-treesitter | 1 - pack/nvim/start/nvim-vsnip | 1 - pack/vim/opt/vim-youcompleteme | 1 - plugin/lsp.nvim | 1 - plugin/max-find-shell.vim | 11 - plugin/max-fix-colorschemes.vim | 62 ----- plugin/max-set-window-title.vim | 22 -- plugin/netrw.vim | 16 -- plugin/vimdiff.vim | 4 - plugin/youcompleteme.vim | 21 -- utils/Xresources | 192 ------------- utils/applications/gvim-buffer.desktop | 10 - utils/applications/gvim.desktop | 10 - utils/applications/nvim.desktop | 10 - utils/applications/vim.desktop | 15 - utils/bashrc | 46 ---- utils/default-font.conf | 82 ------ utils/default-font.conf.old | 49 ---- utils/gtk-3.0.css | 132 --------- utils/gtkrc-2.0 | 1 - utils/locale.conf | 14 - utils/update.sh | 1 - utils/xinputrc | 3 - vimrc | 412 ++++++++++++++++++++++++++-- vimrc-common | 379 ------------------------- 65 files changed, 962 insertions(+), 1669 deletions(-) create mode 100755 README.md mode change 100644 => 100755 after/ftdetect/log.vim delete mode 100644 after/ftplugin/javascript.vim mode change 100644 => 100755 after/ftplugin/python.vim mode change 100644 => 100755 after/indent/html5.vim mode change 100644 => 100755 after/indent/php.vim mode change 100644 => 100755 after/indent/yaml.vim mode change 100644 => 100755 after/syntax/c.vim mode change 100644 => 100755 after/syntax/log.vim mode change 100644 => 100755 after/syntax/markdown.vim delete mode 100644 doc/coderonline-vim.png delete mode 100644 doc/git delete mode 100644 doc/git.txt delete mode 100644 doc/gtk.css delete mode 100644 doc/list-of-filetypes.txt delete mode 100644 doc/readme.md delete mode 100644 doc/screen.txt delete mode 100644 doc/shortcuts.txt create mode 100644 init-mini.lua delete mode 160000 pack/all/start/fzf delete mode 160000 pack/all/start/fzf.vim delete mode 160000 pack/all/start/vim-colorscheme-papercolor delete mode 160000 pack/all/start/vim-editorconfig delete mode 160000 pack/all/start/vim-fancy-line delete mode 160000 pack/all/start/vim-karlmarks delete mode 160000 pack/all/start/vim-mercenary delete mode 160000 pack/all/start/vim-recently-used delete mode 160000 pack/all/start/vim-under-the-cursor delete mode 160000 pack/nvim/start/nvim-cmp delete mode 160000 pack/nvim/start/nvim-cmp-buffer delete mode 160000 pack/nvim/start/nvim-cmp-lsp-signature-help delete mode 160000 pack/nvim/start/nvim-cmp-nvim-lsp delete mode 160000 pack/nvim/start/nvim-colorizer delete mode 160000 pack/nvim/start/nvim-lsp delete mode 160000 pack/nvim/start/nvim-lspconfig delete mode 160000 pack/nvim/start/nvim-lua-language-server delete mode 160000 pack/nvim/start/nvim-plenary delete mode 160000 pack/nvim/start/nvim-telescope delete mode 160000 pack/nvim/start/nvim-treesitter delete mode 160000 pack/nvim/start/nvim-vsnip delete mode 160000 pack/vim/opt/vim-youcompleteme delete mode 100644 plugin/lsp.nvim delete mode 100644 plugin/max-find-shell.vim delete mode 100644 plugin/max-fix-colorschemes.vim delete mode 100644 plugin/max-set-window-title.vim delete mode 100644 plugin/netrw.vim delete mode 100644 plugin/vimdiff.vim delete mode 100644 plugin/youcompleteme.vim delete mode 100644 utils/Xresources delete mode 100644 utils/applications/gvim-buffer.desktop delete mode 100644 utils/applications/gvim.desktop delete mode 100644 utils/applications/nvim.desktop delete mode 100755 utils/applications/vim.desktop delete mode 100644 utils/bashrc delete mode 100644 utils/default-font.conf delete mode 100644 utils/default-font.conf.old delete mode 100644 utils/gtk-3.0.css delete mode 100644 utils/gtkrc-2.0 delete mode 100644 utils/locale.conf delete mode 100644 utils/update.sh delete mode 100644 utils/xinputrc delete mode 100644 vimrc-common diff --git a/README.md b/README.md new file mode 100755 index 0000000..2d5747f --- /dev/null +++ b/README.md @@ -0,0 +1,298 @@ +# Installation +``` +git clone http://git.entwicklerseite.de/vim ~/.config/nvim/ +``` + +# Overview + +- init.lua :: my every day neovim config. It sources my vimrc (see below) + +- init-mini.lua :: if you want to start from scratch this is a good start. It + sets up nvim with a language server to support the creation of a new config. + +- vimrc :: commented version of a vimrc with sane defaults + + +``` + . +├──  after +│ ├──  ftdetect +│ │ └──  log.vim +│ ├──  ftplugin +│ │ └──  python.vim +│ ├──  indent +│ │ ├──  html5.vim +│ │ ├──  php.vim +│ │ └──  yaml.vim +│ └──  syntax +│ ├──  c.vim +│ ├──  log.vim +│ └──  markdown.vim +├──  gvimrc +├──  init-mini.lua +├──  init.lua +├──  README.md +└──  vimrc +``` + + +# Cheat sheet +For different working scenarios. + +## vim + +- use `` to expand autocompletion on the `:` command line. That works for + example for `:setfiletype ` to show all available filetypes. + +- use `gw` or `gq` in visual mode to break selected text at the current + textwidth (configured with `set textwidth=80` for example) + +``` +:viusage = summary of all keyboard shortcuts +:options = shows currently :set options (with descriptions) +leader key = usually set to backslash expects a quick command + + +[normal mode] +f{char} = move cursor to the character {char} +gf = open file under cursor +gf = open file under cursor in a tab +] = jump to the tag under the cursor in a new window + = jump back from where that ^ brought you +K = keyword lookup for the word under the cursor (see :help kp) +w = next word +e = end of word (=inner word) + + +@see: :h text-objects +ci' = change between single quote +ci" = change between double quote +ci( = change between brace +cit = change XML Tag +ciw = select inner word +caw = select 'a word' +" where c can be replaced by v for visual mode + +:%s/foo/bar/g = replace all foo with bar +:g/foo/s/bar//g = on lines with foo replace bar with nothing +:g!/foo/s/bar//g = on lines not containing foo replace bar with nothing +:g!/^foo/execute("normal dd") delete lines starting with foo + +flags, end: after the last / +g = replace globally (all occurances on the current line) +c = confirm each replace, also allows to switch to g (use the flag to see the help message) +e = places the cursor in the end of the selection + +flags, within the search string: +\v = use very magic search (more like perl) +\V = use no very magic, more like searching verbatim +\zs .. \ze = mark begin and end of a sub pattern (like perl lookaround assertions) + + + +[visual mode] # with selected lines +gq = formats text so that it fits in whatever :set textwidth was set +iB = select block between curly braces (:help object-select) + + +[commands] +command line mode begins with : and has its own key mappings starting with c like in cnormap + +:spell [word] = adds a word to the current dictionary (no mistake any more) +:set list = display non printable characters +:retab = replaces tabs with spaces +:set expandtab = in insert mode: replace tab with spaces +:Explore = cli version open file dialog (file explorer) +:Lex = use netrw as project drawer (stays open in its own window) +:only = 'maximize' current buffer + + = auto completion with the word under the cursor (interesting with incsearch) + = expand pattern from command line (e.g. *.txt) + + +[navigation] + = look up the tag under the cursor (help links as well) + = return back from tag under the cursor +gd = jump to the declaration of the variable under the cursor + + +[macros] # record and play back a series of vim commands +qa = start (q) macro recording in register a (can be anything) +q = stop macro recording +@a = replay macro a +:'<,'>normal @a = apply a to every line in the current selection +:reg = lists all registers (including those with macros in them) + +[registers] +notice, that registers get used for both: macro recordings and copying text + +:reg = shows contents of all registers +"0p = pasts from register 0, which is the same as "", but not overwritten by dd +"ap = same for register a +"0yy = yanks to register 0 (same as y by itself) +"ay = yanks current selection to register a (in visual mode) + + +[marker] +ma = set marker a-z (a in this case) +mA = create a session persistent file marker which can be used to reopen a file (not bound to the buffer) +`a = go to marker a (line & column) +'a = go to marker a (line, first non blank), same as `a^ + + + +[hotkeys] +, = increment, decrement number under the cursor + + +[windows] +v = splits buffer vertically (screen uses |) +s = splits buffer horizontally (same as screen) +w = moves the cursor to the next window and back +[dir] = moves the cursor in that direction (use hjkl or arrow keys) +[HK] = make a vertical split horizontal and vice versa +o = only: close all other windows +c = close: current window in which the cursor sits + + +[vimdiff] +do = get changes from other window into the current +dp = put changes from current window into the other +]c = jump to the next change +[c = jump to the prevous change + +[folds] +za = toggle a fold +zM = close all folds +zR = opens all folds (unfold all) +zE = eliminates all folds + + +[buffers] +:bn = buffer next +:bp = buffer previous +:bd = buffer dispatch (close) +:b = switch buffer by name (use and ) +:set nobuflisted = hide buffer in buffer list (great for neovim's terminal) + +[args] +:n **/*.c = opens all files with that name or type in buffers and also fills the argument list + + +[special] +g CTRL-g = display file properties including word and char count +q: = show command history and use it like a normal buffer +z= = show spellcheck suggestions + + +[completions] +CTRL-O = display completions: omnicomplete (context dependant completions) + +CTRL-X CTRL-F = display completions: file name (using vim-internals omnicomplete) +CTRL-N CTRL-P = display completions: file keywords +CTRL-K = display completions: dictionary +CTRL-T = display completions: thesaurus +CTRL-I = display completions: include files +CTRL-] = display completions: tags +CTRL-D = display completions: (marcro-) definitions +CTRL-V = display completions: vim command line +CTRL-U = display completions: user-defined + + +[annoyances] +gv = visual mode: reselect last selection +CTRL-o = lets the caret jump back to the previous location +CTRL-L = redraws the complete screen +CTRL-R = in insert mode and command line: paste contents of (e.g. : for last command, * for clipboard) +CTRL-R = in normal mode: redoes what has been undone with u +"p = in normal mode: paste paste contents of + +[registers] +"/ = last search expression +": = last command entered +"= = expression register (to do calculations or call vim functions) + + + +[netrw] +:Lex = open the netrw-view as project drawer +gn = makes the directory under the cursor the root directory +a = toggles display of hidden files + +[filetype:css] +viB:sort = sort inner block by name + +[vim commands] +:for i in range(1,12) | put ='2016-'.i | endfor + +[fancy utf-8 symbols] +௵ + +[debugging] +:profile! start /tmp/profile.log +:profile func * +:profile file * +" At this point do slow actions +:profdel * +:e /tmp/profile.log +" add a break point to a vim script (like vimrc) to invoke the internal debugger +:breakadd here + +:finish = from within a viml-script: stop sourcing it + +[substitutions] +delete all comments: %s/\/\*\*< [^(\*\/)]*\*\///g +remove empty lines: global/^$/d +remove non-empty lines: v/^$/d + +[programs] +gpm - cut and paste helper for the linux console (to get text from CTRL-ALT-F2 to CTRL-ALT-F3) + + +[vim modeline] +filetype can have multiple values, like python.django +The last line can be a mode line, which holds settings like tab width: +``` + + +## git + + undo last commit: git reset HEAD~ + diff two branches: git diff branch1 branch2 path/to/file + + + +To `~/.gitconfig` add: + [alias] + branchvv = for-each-ref --sort='committerdate:raw' --format='%(HEAD)%(if)%(HEAD)%(then)%(color:bold green)%(end) %(align:width=24)%(refname:short)%(end) %(objectname:short) %(color:bold blue)%(committerdate:iso)%(color:reset) %(if)%(upstream)%(then)[%(color:blue)%(upstream:short)%(color:reset)] %(end)%(subject)' refs/heads + +Provides you with `git branchvv`, a command that works similar to `git branch`, +but sorts the branches by modification date and displays them. + + +# gnu screen + +To run Vim in a gnu screen session: + + TERM=vte-256color screen vim + +But if you are using another terminal there may be further options with even +more capabilities. Starting point for you search could be something like: + + find /usr/share/terminfo/ | grep screen | grep 256 + +# gvim + +Change the default brackground of applications if you see an ugly grey border +around your beatiful theme: + +``` +/* to be saved as ~/.config/gtk-3.0/gtk.css + * thanks to http://stackoverflow.com/users/6899000/proprefenetre */ +@define-color YOUR_BACKGROUND_COLOR #rrggbb; + +window#vim-main-window { + background-color: @YOUR_BACKGROUND_COLOR; +} +``` + diff --git a/after/ftdetect/log.vim b/after/ftdetect/log.vim old mode 100644 new mode 100755 diff --git a/after/ftplugin/javascript.vim b/after/ftplugin/javascript.vim deleted file mode 100644 index ce0e6f2..0000000 --- a/after/ftplugin/javascript.vim +++ /dev/null @@ -1 +0,0 @@ -" set number diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim old mode 100644 new mode 100755 diff --git a/after/indent/html5.vim b/after/indent/html5.vim old mode 100644 new mode 100755 diff --git a/after/indent/php.vim b/after/indent/php.vim old mode 100644 new mode 100755 diff --git a/after/indent/yaml.vim b/after/indent/yaml.vim old mode 100644 new mode 100755 diff --git a/after/syntax/c.vim b/after/syntax/c.vim old mode 100644 new mode 100755 diff --git a/after/syntax/log.vim b/after/syntax/log.vim old mode 100644 new mode 100755 diff --git a/after/syntax/markdown.vim b/after/syntax/markdown.vim old mode 100644 new mode 100755 diff --git a/doc/coderonline-vim.png b/doc/coderonline-vim.png deleted file mode 100644 index 156ff3a..0000000 Binary files a/doc/coderonline-vim.png and /dev/null differ diff --git a/doc/git b/doc/git deleted file mode 100644 index 1205d00..0000000 --- a/doc/git +++ /dev/null @@ -1,2 +0,0 @@ -undo last commit: git reset HEAD~ -diff two branches: git diff branch1 branch2 path/to/file diff --git a/doc/git.txt b/doc/git.txt deleted file mode 100644 index 517f998..0000000 --- a/doc/git.txt +++ /dev/null @@ -1,3 +0,0 @@ -GIT_PAGER=less git config --list | awk 'match($0, "submodule.(.*).url=(.*)",q){ system("echo git submodule add " q[2] " " q[1]) }' - -branchvv = for-each-ref --sort='committerdate:raw' --format='%(HEAD)%(if)%(HEAD)%(then)%(color:bold green)%(end) %(align:width=24)%(refname:short)%(end) %(objectname:short) %(color:bold blue)%(committerdate:iso)%(color:reset) %(if)%(upstream)%(then)[%(color:blue)%(upstream:short)%(color:reset)] %(end)%(subject)' refs/heads diff --git a/doc/gtk.css b/doc/gtk.css deleted file mode 100644 index 5f15661..0000000 --- a/doc/gtk.css +++ /dev/null @@ -1,7 +0,0 @@ -/* to be saved as ~/.config/gtk-3.0/gtk.css - * thanks to http://stackoverflow.com/users/6899000/proprefenetre */ -@define-color YOUR_BACKGROUND_COLOR #rrggbb; - -window#vim-main-window { - background-color: @YOUR_BACKGROUND_COLOR; -} diff --git a/doc/list-of-filetypes.txt b/doc/list-of-filetypes.txt deleted file mode 100644 index 9752c6a..0000000 --- a/doc/list-of-filetypes.txt +++ /dev/null @@ -1,175 +0,0 @@ -# this list can be generated with ':setfiletype '. I have copied it to -# make it searchable. - -2html erlang master sinda -HGAnnotate eruby matlab sindacmp -PKGBUILD esmtprc maxima sindaout -a2ps esqlc mel sisu -a65 esterel messages skill -aap eterm mf sl -abap euphoria3 mgl slang -abaqus euphoria4 mgp slice -abc eviews mib slim -abel exim mix slpconf -acedb expect mma slpreg -ada exports mmix slpspi -aflex falcon mmp slrnrc -ahdl fan modconf slrnsc -alsaconf fasm model sm -amiga fdcc modsim3 smarty -aml fetchmail modula2 smcl -ampl fgl modula3 smil -ansible fish monk smith -ansible_hosts flexwiki moo sml -ansible_template focexec mp snnsnet -ant form mplayerconf snnspat -antlr forth mrxvtrc snnsres -apache fortran msidl snobol4 -apachestyle foxpro msmessages solidity -aptconf framescript msql spec -arch freebasic mupad specman -arduino fstab mush spice -art fvwm mustache splint -asciidoc fvwm2m4 muttrc spup -asm gdb mysql spyce -asm68k gdmo named sql -asmh8300 gedcom nanorc sqlanywhere -asn git nasm sqlforms -aspperl gitcommit nastran sqlhana -aspvbs gitconfig natural sqlinformix -asterisk gitolite ncf sqlj -asteriskvm gitrebase netrc sqloracle -atlas gitsendemail netrw sqr -augeas gkrellmrc nginx squid -autohotkey glsl nim srec -autoit gnash ninja sshconfig -automake gnomecat nix sshdconfig -ave gnuplot nosyntax st -avra go nqc stata -awk godefstack nroff stp -ayacc godoc nsis strace -b gohtmltmpl obj stylus -baan gotexttmpl objc sudoers -basic gp objcpp svg -bc gpg ocaml svn -bdf gprof occam swift -bib grads octave syncolor -bib_latexSuite gretl omnimark synload -bindzone groff opencl syntax -blade groovy openroad sysctl -blank group opl systemd -bst grub ora systemverilog -btm gsp pamconf tads -bzl gtkrc papp tags -bzr haml pascal tak -c hamster passwd takcmp -cabal handlebars pcap takout -calendar haskell pccts tap -catalog haste pdf tar -cdl hastepreproc perl taskdata -cdrdaoconf haxe perl6 taskedit -cdrtoc haxe_extended pf tasm -cf hb pfmain tcl -cfg help pgsql tcsh -ch hercules php teraterm -chaiscript hex phtml terminfo -change hgcommit pic tex -changelog hitest pike tex_LatexBox -chaskell hog pilrc tex_latexSuite -cheetah hostconf pine texinfo -chill hostsaccess pinfo texmf -chordpro hss plaintex text -cl html plantuml textile -clean html5 pli tf -clipper htmlcheetah plm thrift -clojure htmldjango plp tidy -cmake htmlm4 plsql tilde -cmake-indent htmlos po tli -cmake-syntax hxml pod tmux -cmusrc ia64 postscr tomdoc -cobol ibasic pov toml -coco icemenu povini tpp -coffee icon ppd trasys -color_coded idl ppwiz treetop -colortest idlang prescribe trustees -conaryrecipe indent privoxy tsalt -conf inform procmail tsscl -config initex progress tssgm -context initng prolog tssop -cpp inittab promela tt2 -cql ipfilter proto tt2html -crm ishd protocols tt2js -crontab iss ps1 twig -cryptol ist ps1xml typescript -crystal j psf uc -cs jal ptcap udevconf -csc jam pug udevperm -cscope_plus jargon puppet udevrules -csdl jasmine purescript uil -csh java purifylog updatedb -csp javacc pyrex upstart -css javascript python upstreamdat -cterm jess qf upstreaminstalllog -ctrlh jgraph qml upstreamlog -cucumber jinja2 quake upstreamrpt -cuda jovial r usserverlog -cupl jproperties racc usw2kagtlog -cuplsim json radiance vala -cuda jovial r usserverlog -cupl jproperties racc usw2kagtlog -cuplsim json radiance vala -cvs jsp ragel valgrind -cvsrc jst ratpoison vb -cweb jsx rc vbnet -cynlib julia rcs vcl -cynpp kconfig rcslog velocity -d kivy readline vera -dart kix rebol verilog -datascript kotlin redif verilogams -dcd kscript registry vgrindefs -dcl kwt remind vhdl -debchangelog lace resolv vim -debcontrol latextoc reva vimgo -debsources latte rexx viminfo -def ld rhelp virata -denyhosts ldapconf rib vmasm -desc ldif rmd voscm -desktop less rnc vrml -dictconf lex rng vroom -dictdconf lftp rnoweb vsejcl -diff lhaskell robots vundlelog -dircolors libao rpcgen wdiff -dirpager lifelines rpl web -diva lilo rrst webmacro -django limits rspec wget -dns liquid rst whitespace -dnsmasq lisp rtf winbatch -docbk lite ruby wml -docbksgml litestep rust wsh -docbkxml logcheck samba wsml -dockerfile loginaccess sas wvdial -dosbatch logindefs sass xbl -dosini logtalk sather xdefaults -dot lotos sbt xf86conf -doxygen lout scala xhtml -dracula lpc scala.xpt xinetd -dsl lprolog scheme xkb -dtd lscript scilab xmath -dtml lsl screen xml -dtrace lss scss xmodmap -dts lua sd xpm -dylan lynx sdc xpm2 -dylanintr m4 sdl xquery -dylanlid mail sed xs -ecd mailaliases sendpr xsd -edif mailcap sensors xsl -eelixir make services xslt -eiffel mallard setserial xxd -elf man sgml yacc -elinks manconf sgmldecl yaml -elixir manual sgmllnx z8a -elm maple sh zimbu -elmfilt markdown sicad zsh -ember-script masm sieve -emblem mason simula - diff --git a/doc/readme.md b/doc/readme.md deleted file mode 100644 index 5ea6da4..0000000 --- a/doc/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -vim configuration -================= - -This is the configuration I am using. - - -Screenshot ----------- - - - screenshot of vim - - - - diff --git a/doc/screen.txt b/doc/screen.txt deleted file mode 100644 index 5c375d2..0000000 --- a/doc/screen.txt +++ /dev/null @@ -1,9 +0,0 @@ -To run vim inside a screen session: - -TERM=vte-256color screen vim - -works very well. But if you are using another terminal you may be interested in -other possibilities, like this: - -find /usr/share/terminfo/ | grep screen | grep 256 - diff --git a/doc/shortcuts.txt b/doc/shortcuts.txt deleted file mode 100644 index 5e911ea..0000000 --- a/doc/shortcuts.txt +++ /dev/null @@ -1,206 +0,0 @@ -:viusage = summary of all keyboard shortcuts -:options = shows currently :set options (with descriptions) -leader key = usually set to backslash expects a quick command - - -[normal mode] -f{char} = move cursor to the character {char} -gf = open file under cursor -gf = open file under cursor in a tab -] = jump to the tag under the cursor in a new window - = jump back from where that ^ brought you -K = keyword lookup for the word under the cursor (see :help kp) -w = next word -e = end of word (=inner word) - - -@see: :h text-objects -ci' = change between single quote -ci" = change between double quote -ci( = change between brace -cit = change XML Tag -ciw = select inner word -caw = select 'a word' -" where c can be replaced by v for visual mode - -:%s/foo/bar/g = replace all foo with bar -:g/foo/s/bar//g = on lines with foo replace bar with nothing -:g!/foo/s/bar//g = on lines not containing foo replace bar with nothing -:g!/^foo/execute("normal dd") delete lines starting with foo - -flags, end: after the last / -g = replace globally (all occurances on the current line) -c = confirm each replace, also allows to switch to g (use the flag to see the help message) -e = places the cursor in the end of the selection - -flags, within the search string: -\v = use very magic search (more like perl) -\V = use no very magic, more like searching verbatim -\zs .. \ze = mark begin and end of a sub pattern (like perl lookaround assertions) - - - -[visual mode] # with selected lines -gq = formats text so that it fits in whatever :set textwidth was set -iB = select block between curly braces (:help object-select) - - -[commands] -command line mode begins with : and has its own key mappings starting with c like in cnormap - -:spell [word] = adds a word to the current dictionary (no mistake any more) -:set list = display non printable characters -:retab = replaces tabs with spaces -:set expandtab = in insert mode: replace tab with spaces -:Explore = cli version open file dialog (file explorer) -:Lex = use netrw as project drawer (stays open in its own window) -:only = 'maximize' current buffer - - = auto completion with the word under the cursor (interesting with incsearch) - = expand pattern from command line (e.g. *.txt) - - -[navigation] - = look up the tag under the cursor (help links as well) - = return back from tag under the cursor -gd = jump to the declaration of the variable under the cursor - - -[macros] # record and play back a series of vim commands -qa = start (q) macro recording in register a (can be anything) -q = stop macro recording -@a = replay macro a -:'<,'>normal @a = apply a to every line in the current selection -:reg = lists all registers (including those with macros in them) - -[registers] -notice, that registers get used for both: macro recordings and copying text - -:reg = shows contents of all registers -"0p = pasts from register 0, which is the same as "", but not overwritten by dd -"ap = same for register a -"0yy = yanks to register 0 (same as y by itself) -"ay = yanks current selection to register a (in visual mode) - - -[marker] -ma = set marker a-z (a in this case) -mA = create a session persistent file marker which can be used to reopen a file (not bound to the buffer) -`a = go to marker a (line & column) -'a = go to marker a (line, first non blank), same as `a^ - - - -[hotkeys] -, = increment, decrement number under the cursor - - -[windows] -v = splits buffer vertically (screen uses |) -s = splits buffer horizontally (same as screen) -w = moves the cursor to the next window and back -[dir] = moves the cursor in that direction (use hjkl or arrow keys) -[HK] = make a vertical split horizontal and vice versa -o = only: close all other windows -c = close: current window in which the cursor sits - - -[vimdiff] -do = get changes from other window into the current -dp = put changes from current window into the other -]c = jump to the next change -[c = jump to the prevous change - -[folds] -za = toggle a fold -zM = close all folds -zR = opens all folds (unfold all) -zE = eliminates all folds - - -[buffers] -:bn = buffer next -:bp = buffer previous -:bd = buffer dispatch (close) -:b = switch buffer by name (use and ) -:set nobuflisted = hide buffer in buffer list (great for neovim's terminal) - -[args] -:n **/*.c = opens all files with that name or type in buffers and also fills the argument list - - -[special] -g CTRL-g = display file properties including word and char count -q: = show command history and use it like a normal buffer -z= = show spellcheck suggestions - - -[completions] -CTRL-O = display completions: omnicomplete (context dependant completions) - -CTRL-X CTRL-F = display completions: file name (using vim-internals omnicomplete) -CTRL-N CTRL-P = display completions: file keywords -CTRL-K = display completions: dictionary -CTRL-T = display completions: thesaurus -CTRL-I = display completions: include files -CTRL-] = display completions: tags -CTRL-D = display completions: (marcro-) definitions -CTRL-V = display completions: vim command line -CTRL-U = display completions: user-defined - - -[annoyances] -gv = visual mode: reselect last selection -CTRL-o = lets the caret jump back to the previous location -CTRL-L = redraws the complete screen -CTRL-R = in insert mode and command line: paste contents of (e.g. : for last command, * for clipboard) -CTRL-R = in normal mode: redoes what has been undone with u -"p = in normal mode: paste paste contents of - -[registers] -"/ = last search expression -": = last command entered -"= = expression register (to do calculations or call vim functions) - - - -[netrw] -:Lex = open the netrw-view as project drawer -gn = makes the directory under the cursor the root directory -a = toggles display of hidden files - -[filetype:css] -viB:sort = sort inner block by name - -[vim commands] -:for i in range(1,12) | put ='2016-'.i | endfor - -[fancy utf-8 symbols] -௵ - -[debugging] -:profile! start /tmp/profile.log -:profile func * -:profile file * -" At this point do slow actions -:profdel * -:e /tmp/profile.log -" add a break point to a vim script (like vimrc) to invoke the internal debugger -:breakadd here - -:finish = from within a viml-script: stop sourcing it - -[substitutions] -delete all comments: %s/\/\*\*< [^(\*\/)]*\*\///g -remove empty lines: global/^$/d -remove non-empty lines: v/^$/d - -[programs] -gpm - cut and paste helper for the linux console (to get text from CTRL-ALT-F2 to CTRL-ALT-F3) - - -[vim modeline] -filetype can have multiple values, like python.django -The last line can be a mode line, which holds settings like tab width: - -# vim: noai:ts=2:sw=2 filetype=dosini.text diff --git a/gvimrc b/gvimrc index eda4fc7..2f9e8ec 100644 --- a/gvimrc +++ b/gvimrc @@ -28,3 +28,5 @@ if has("gui_running") " like in the terminal: use Ctrl-shift-v for paste in vim's command editor cnoremap * endif + +source fnamemodify(expand("$MYVIMRC"), ":p:h") . "/vimrc" diff --git a/init-mini.lua b/init-mini.lua new file mode 100644 index 0000000..0ac8d1e --- /dev/null +++ b/init-mini.lua @@ -0,0 +1,90 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) +require("lazy").setup(plugins, opts) + + +vim.opt.number = true + +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 + + +require('gitsigns').setup() + +local cmp = require'cmp' +cmp.setup({ + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+) + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = 'nvim_lsp' }, + { name = 'luasnip' }, -- For luasnip users. + }, { + { name = 'buffer' }, + }) +}) + +-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline({ '/', '?' }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = 'buffer' } + } +}) + +-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). +cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = 'path' } + }, { + { name = 'cmdline' } + }), + matching = { disallow_symbol_nonprefix_matching = false } +}) + + +require'cmp'.setup { + sources = { + { name = 'nvim_lua' } + } +} + +-- Set up lspconfig. +local capabilities = require('cmp_nvim_lsp').default_capabilities() +require("neodev").setup({ + capabilities = capabilities, +}) +-- Replace with each lsp server you've enabled. +require('lspconfig').lua_ls.setup({ + capabilities = capabilities, + settings = { + Lua = { + diagnostics = { + globals = {'vim'} + } + } + } +}) diff --git a/init.lua b/init.lua index 2dc45ee..ce9d584 100644 --- a/init.lua +++ b/init.lua @@ -1,43 +1,165 @@ -vim.cmd('source ~/.vim/vimrc') +-------------------------------------------------------------------------------- +-- lazy plugin manager +-------------------------------------------------------------------------------- +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or vim.loop).fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter = blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch = stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) +require("lazy").setup({ + 'nvim-tree/nvim-web-devicons', + 'lewis6991/gitsigns.nvim', + 'folke/neodev.nvim', + 'neovim/nvim-lspconfig', + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-buffer', + 'hrsh7th/cmp-path', + 'hrsh7th/cmp-cmdline', + 'hrsh7th/nvim-cmp', + 'hrsh7th/vim-vsnip', + 'octaltree/cmp-look', + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', + 'RRethy/base16-nvim', + 'nvim-treesitter/nvim-treesitter', + 'nvim-lua/popup.nvim', + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope.nvim', + 'nvim-telescope/telescope-media-files.nvim', + 'coderonline/vim-fancy-line', + 'coderonline/vim-recently-used', + 'norcalli/nvim-colorizer.lua', + 'folke/trouble.nvim', +}) +-------------------------------------------------------------------------------- +-- vim options, first sourced from vimrc, then appended by Neovim specific stuff +-------------------------------------------------------------------------------- +local configdir = vim.fn.fnamemodify(vim.fn.expand("$MYVIMRC"), ":p:h") +vim.cmd('source ' .. configdir .. '/vimrc') +vim.cmd.colorscheme "base16-rebecca" +-- vim.cmd.colorscheme "base16-katy" + +vim.opt.encoding = 'utf-8' +vim.opt.number = true +vim.opt.number = true +vim.opt.shiftwidth = 2 +vim.opt.tabstop = 2 +vim.opt.softtabstop = 2 +vim.opt.inccommand = "nosplit" -- Neovim only: preview substitute and such things in real time vim.opt.termguicolors = true -vim.opt.exrc = true -vim.opt.foldmethod = 'syntax' +vim.opt.shadafile = configdir .. "/shada.file" + +-- Restore cursor position +vim.api.nvim_create_autocmd({ "BufReadPost" }, { + callback = function() vim.cmd('silent! normal! g`"zv') end +}) + +vim.api.nvim_create_user_command( + 'LspFix', + function() + vim.lsp.buf.code_action() + end, {} +) if vim.fn.has("win32") then vim.opt.rtp:append(vim.fn.expand("$HOME\\scoop\\shims")) end -vim.opt.runtimepath:remove("/usr/share/vim/vimfiles") -vim.keymap.set('n', '', ':Buffers') - +vim.g.lsp_log_verbose = 1 +vim.g.lsp_log_file = configdir .. ('/vim-lsp.log') + +if vim.g.neovide then + vim.guifont = "monospace:h11:b" + vim.g.neovide_cursor_animation_length = 0.03 + vim.g.neovide_cursor_trail_size = 0.8 + vim.g.neovide_scroll_animation_length = 0.05 + vim.g.neovide_transparency = 0.9 + vim.g.neovide_cursor_animation_length=0 + vim.g.neovide_cursor_vfx_mode = "" + vim.g.neovide_floating_blur_amount_x = 4.0 + vim.g.neovide_floating_blur_amount_y = 4.0 + vim.g.neovide_background_color = '#383a62' + vim.g.neovide_scale_factor = 1.0 +end +-------------------------------------------------------------------------------- +-- plugin setup and options +-------------------------------------------------------------------------------- +require'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" (the five listed parsers should always be installed) + ensure_installed = { "c", "lua", "vim", "vimdoc", "query" }, + modules = {}, + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + ignore_install = { "javascript" }, + highlight = { + enable = true, + -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to + -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is + -- the name of the parser) + -- list of language that will be disabled + disable = function(_, buf) + local max_filesize = 100 * 1024 -- 100 KB + local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf)) + if ok and stats and stats.size > max_filesize then + return true + end + end, + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, +} --- vim.o.shadafile = "/tmp/shada" +-- vim.wo.foldtext = 'v:lua.vim.treesitter.foldtext()' -- not available yet in my installation +vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' +vim.wo.foldlevel = 1 --- only on Linux... --- vim.o.shadafile = (os.getenv("XDG_CACHE_HOME") or --- os.getenv("HOME") .. "/.cache" --- ) .. "/vim.shada" --- vimscript: get(environ(), "XDG_CACHE_HOME", "~/.cache")."/vim.shada" --- require'man' +require('telescope').load_extension('media_files') -require'colorizer'.setup() +vim.lsp.set_log_level 'error' +if vim.fn.has 'nvim-0.5.1' == 1 then + require('vim.lsp.log').set_format_func(vim.inspect) +end +require'nvim-web-devicons'.setup { + color_icons = true; + default = true; + strict = true; +} +require('colorizer').setup() +require('gitsigns').setup() +require('trouble').setup() +require('neodev').setup() --- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers.. -require('cmp_nvim_lsp').setup{} -local capabilities = require('cmp_nvim_lsp').default_capabilities() +local builtin = require('telescope.builtin') +vim.keymap.set('n', 'ff', builtin.find_files, {}) +vim.keymap.set('n', 'fg', builtin.live_grep, {}) +vim.keymap.set('n', 'fb', builtin.buffers, {}) +vim.keymap.set('n', 'fh', builtin.help_tags, {}) +vim.keymap.set({"i", "s"}, "", function() require('luasnip').jump(1) end, {silent = true}) +vim.keymap.set({"i", "s"}, "", function() require('luasnip').jump(-1) end, {silent = true}) -local cmp = require('cmp'); +local cmp = require'cmp' cmp.setup({ snippet = { -- REQUIRED - you must specify a snippet engine expand = function(args) - vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. - -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. - -- require('snippy').expand_snippet(args.body) -- For `snippy` users. - -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + -- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+) end, }, window = { @@ -47,34 +169,13 @@ cmp.setup({ mapping = cmp.mapping.preset.insert({ [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), - [""] = cmp.mapping.select_next_item({behavior=cmp.SelectBehavior.Insert}), - [""] = cmp.mapping.select_prev_item({behavior=cmp.SelectBehavior.Insert}), [''] = cmp.mapping.complete(), [''] = cmp.mapping.abort(), - -- [''] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - - [""] = cmp.mapping.confirm({ - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }), - - [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. }), sources = cmp.config.sources({ { name = 'nvim_lsp' }, - { name = 'vsnip' }, -- For vsnip users. - -- { name = 'luasnip' }, -- For luasnip users. - -- { name = 'ultisnips' }, -- For ultisnips users. - -- { name = 'snippy' }, -- For snippy users. - }, { - { name = 'buffer' }, - }) -}) - --- Set configuration for specific filetype. -cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. + { name = 'luasnip' }, -- For luasnip users. }, { { name = 'buffer' }, }) @@ -82,75 +183,88 @@ cmp.setup.filetype('gitcommit', { -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline({ '/', '?' }, { - -- mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } + mapping = cmp.mapping.preset.cmdline({ + [''] = { c = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }) }, + [''] = { c = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }) }, + }), + sources = {{ name = 'buffer' }} }) -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). cmp.setup.cmdline(':', { - -- mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'cmdline' } - }) + mapping = cmp.mapping.preset.cmdline({ + [''] = { c = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }) }, + [''] = { c = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }) }, + }), + sources = cmp.config.sources( + {{ name = 'path' }}, + {{ name = 'cmdline' }} + ), + matching = { + disallow_symbol_nonprefix_matching = false, + disallow_partial_matching = false, + disallow_fullfuzzy_matching = false, + disallow_fuzzy_matching = false, + disallow_partial_fuzzy_matching = false, + disallow_prefix_unmatching = false, + } }) +-- Set up lspconfig. +local capabilities = require('cmp_nvim_lsp').default_capabilities() -- # Language Servers -- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md --- The following example advertise capabilities to `clangd`. -- C/C++ | clang require('lspconfig')['clangd'].setup{capabilities = capabilities} - +-- lua (but not init.lua entirely, hence why neodev) +require('lspconfig')['lua_ls'].setup { capabilities = capabilities } +-- require('lspconfig')['java_language_server'].setup{ cmd = { "/usr/share/java/java-language-server/lang_server_linux.sh" }, root_dir = function () return vim.fn.getcwd() end } +require'lspconfig'.jdtls.setup{} -- bash | bash-language-server require('lspconfig')['bashls'].setup{capabilities = capabilities} - -- ccs | vscode-css-languageserver require('lspconfig')['cssls'].setup{capabilities = capabilities} - -- rust | rust-analyzer require('lspconfig')['rust_analyzer'].setup{capabilities = capabilities} - -- javascript | eslint require('lspconfig')['eslint'].setup{capabilities = capabilities} - -- javascript | typescript-language-server require('lspconfig')['tsserver'].setup{capabilities = capabilities} - -- vimscript | vim-language-server require('lspconfig')['vimls'].setup{capabilities = capabilities} - +-- html require('lspconfig')['html'].setup{capabilities = capabilities} - +-- jsonls require('lspconfig')['jsonls'].setup{capabilities = capabilities} - -- C/C++ | clang require('lspconfig')['clangd'].setup{capabilities = capabilities} - -- bash | bash-language-server require('lspconfig')['bashls'].setup{capabilities = capabilities} - -- ccs | vscode-css-languageserver require('lspconfig')['cssls'].setup{capabilities = capabilities} - -- rust | rust-analyzer require('lspconfig')['rust_analyzer'].setup{capabilities = capabilities} - -- javascript | eslint require('lspconfig')['eslint'].setup{capabilities = capabilities} - -- javascript | typescript-language-server require('lspconfig')['tsserver'].setup{capabilities = capabilities} - -- vimscript | vim-language-server require('lspconfig')['vimls'].setup{capabilities = capabilities} - -require('lspconfig')['html'].setup{capabilities = capabilities} - -require('lspconfig')['jsonls'].setup{capabilities = capabilities} - +-- configure html server +require('lspconfig')["html"].setup({ + capabilities = capabilities, + -- on_attach = on_attach, + init_options = { + configurationSection = { "html", "css", "javascript" }, + embeddedLanguages = { + css = true, + javascript = true, + }, + provideFormatter = true, + }, +}) require('lspconfig')['pylsp'].setup{ settings = { pylsp = { @@ -164,50 +278,4 @@ require('lspconfig')['pylsp'].setup{ } } --- lua -require('lspconfig')['lua_ls'].setup{ - settings = { - Lua = { - diagnostics = { - globals = { 'vim', 'require', 'cmp' } - } - } - } -} - - -require'nvim-treesitter.configs'.setup { - -- A list of parser names, or "all" - ensure_installed = { "c", "bash", "javascript" }, - - -- Install parsers synchronously (only applied to `ensure_installed`) - sync_install = false, - - -- Automatically install missing parsers when entering buffer - -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally - auto_install = true, - - -- List of parsers to ignore installing (for "all") - ignore_install = { "javascript" }, - - ---- If you need to change the installation directory of the parsers (see -> Advanced Setup) - -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")! - - highlight = { - -- `false` will disable the whole extension - enable = true, - - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, -} - --- vim.wo.foldtext = 'v:lua.vim.treesitter.foldtext()' -- not available yet in my installation -vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()' -vim.wo.foldlevel = 1 - - -- vim: tabstop=2 shiftwidth=2 softtabstop=2 diff --git a/pack/all/start/fzf b/pack/all/start/fzf deleted file mode 160000 index 70c461c..0000000 --- a/pack/all/start/fzf +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 70c461c60bb1e2165a378e8ba0451b511c29b5cb diff --git a/pack/all/start/fzf.vim b/pack/all/start/fzf.vim deleted file mode 160000 index d1016db..0000000 --- a/pack/all/start/fzf.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d1016dbd7cec2d2a3bb5863776c84b4034e4b85e diff --git a/pack/all/start/vim-colorscheme-papercolor b/pack/all/start/vim-colorscheme-papercolor deleted file mode 160000 index 9051480..0000000 --- a/pack/all/start/vim-colorscheme-papercolor +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9051480ad9129ff4ab4fffb38b44779b9081626f diff --git a/pack/all/start/vim-editorconfig b/pack/all/start/vim-editorconfig deleted file mode 160000 index e014708..0000000 --- a/pack/all/start/vim-editorconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit e014708e917b457e8f6c57f357d55dd3826880d4 diff --git a/pack/all/start/vim-fancy-line b/pack/all/start/vim-fancy-line deleted file mode 160000 index 6bef996..0000000 --- a/pack/all/start/vim-fancy-line +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6bef9966d5f15203c1567516a5da49b721214237 diff --git a/pack/all/start/vim-karlmarks b/pack/all/start/vim-karlmarks deleted file mode 160000 index 9747ae4..0000000 --- a/pack/all/start/vim-karlmarks +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 9747ae42e4201b0991152d45a604b81c01d3e81c diff --git a/pack/all/start/vim-mercenary b/pack/all/start/vim-mercenary deleted file mode 160000 index 7e57581..0000000 --- a/pack/all/start/vim-mercenary +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7e57581a60aec3bbc6499b4f49b3eca3b71caed6 diff --git a/pack/all/start/vim-recently-used b/pack/all/start/vim-recently-used deleted file mode 160000 index 7845fa4..0000000 --- a/pack/all/start/vim-recently-used +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 7845fa4e392e8808693096329bf3638e3231186f diff --git a/pack/all/start/vim-under-the-cursor b/pack/all/start/vim-under-the-cursor deleted file mode 160000 index f8a3dfb..0000000 --- a/pack/all/start/vim-under-the-cursor +++ /dev/null @@ -1 +0,0 @@ -Subproject commit f8a3dfbdf3b0b9d0eb18423115744f42660750fd diff --git a/pack/nvim/start/nvim-cmp b/pack/nvim/start/nvim-cmp deleted file mode 160000 index d3a3056..0000000 --- a/pack/nvim/start/nvim-cmp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d3a3056204e1a9dbb7c7fe36c114dc43b681768c diff --git a/pack/nvim/start/nvim-cmp-buffer b/pack/nvim/start/nvim-cmp-buffer deleted file mode 160000 index 3022dbc..0000000 --- a/pack/nvim/start/nvim-cmp-buffer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3022dbc9166796b644a841a02de8dd1cc1d311fa diff --git a/pack/nvim/start/nvim-cmp-lsp-signature-help b/pack/nvim/start/nvim-cmp-lsp-signature-help deleted file mode 160000 index 3d8912e..0000000 --- a/pack/nvim/start/nvim-cmp-lsp-signature-help +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1 diff --git a/pack/nvim/start/nvim-cmp-nvim-lsp b/pack/nvim/start/nvim-cmp-nvim-lsp deleted file mode 160000 index 44b16d1..0000000 --- a/pack/nvim/start/nvim-cmp-nvim-lsp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 44b16d11215dce86f253ce0c30949813c0a90765 diff --git a/pack/nvim/start/nvim-colorizer b/pack/nvim/start/nvim-colorizer deleted file mode 160000 index 36c610a..0000000 --- a/pack/nvim/start/nvim-colorizer +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 36c610a9717cc9ec426a07c8e6bf3b3abcb139d6 diff --git a/pack/nvim/start/nvim-lsp b/pack/nvim/start/nvim-lsp deleted file mode 160000 index c58edb9..0000000 --- a/pack/nvim/start/nvim-lsp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit c58edb98f09a650612adaaf8c47995c9e2b7ffb1 diff --git a/pack/nvim/start/nvim-lspconfig b/pack/nvim/start/nvim-lspconfig deleted file mode 160000 index 38da5bb..0000000 --- a/pack/nvim/start/nvim-lspconfig +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 38da5bbe1eaab2394056109e48c7e195bdb8fdfe diff --git a/pack/nvim/start/nvim-lua-language-server b/pack/nvim/start/nvim-lua-language-server deleted file mode 160000 index ce96479..0000000 --- a/pack/nvim/start/nvim-lua-language-server +++ /dev/null @@ -1 +0,0 @@ -Subproject commit ce964793afc6251673238c256a25e06502e487b8 diff --git a/pack/nvim/start/nvim-plenary b/pack/nvim/start/nvim-plenary deleted file mode 160000 index 5001291..0000000 --- a/pack/nvim/start/nvim-plenary +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 50012918b2fc8357b87cff2a7f7f0446e47da174 diff --git a/pack/nvim/start/nvim-telescope b/pack/nvim/start/nvim-telescope deleted file mode 160000 index 74ce793..0000000 --- a/pack/nvim/start/nvim-telescope +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 74ce793a60759e3db0d265174f137fb627430355 diff --git a/pack/nvim/start/nvim-treesitter b/pack/nvim/start/nvim-treesitter deleted file mode 160000 index 4a68f07..0000000 --- a/pack/nvim/start/nvim-treesitter +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 4a68f0778c05083cc458a3a144205cfc41474439 diff --git a/pack/nvim/start/nvim-vsnip b/pack/nvim/start/nvim-vsnip deleted file mode 160000 index be27746..0000000 --- a/pack/nvim/start/nvim-vsnip +++ /dev/null @@ -1 +0,0 @@ -Subproject commit be277461265f1e5c7db470aa479f30956597ea9e diff --git a/pack/vim/opt/vim-youcompleteme b/pack/vim/opt/vim-youcompleteme deleted file mode 160000 index cc9a3ae..0000000 --- a/pack/vim/opt/vim-youcompleteme +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cc9a3ae3efdcc7d038aab0620ea28882533c236c diff --git a/plugin/lsp.nvim b/plugin/lsp.nvim deleted file mode 100644 index 979b35f..0000000 --- a/plugin/lsp.nvim +++ /dev/null @@ -1 +0,0 @@ -command! LspFix lua vim.lsp.buf.code_action() diff --git a/plugin/max-find-shell.vim b/plugin/max-find-shell.vim deleted file mode 100644 index 778f0fb..0000000 --- a/plugin/max-find-shell.vim +++ /dev/null @@ -1,11 +0,0 @@ -"======================================================================================================================= -" SHELL: -" Many scripts rely on bash. We help to find the bash binary -"======================================================================================================================= -if filereadable("/bin/bash") - set shell=/bin/bash -elseif filereadable("/usr/local/bin/bash") - set shell=/usr/local/bin/bash -elseif has("win32") - set shell="cmd.exe" -endif diff --git a/plugin/max-fix-colorschemes.vim b/plugin/max-fix-colorschemes.vim deleted file mode 100644 index 9d0c034..0000000 --- a/plugin/max-fix-colorschemes.vim +++ /dev/null @@ -1,62 +0,0 @@ -"======================================================================================================================= -" COLOR SCHEME: -"======================================================================================================================= -function! ExtendColorTheme() - highlight! Bold cterm=bold gui=bold - highlight! Italic cterm=italic gui=italic - highlight! Underline cterm=underline gui=underline - highlight! BoldUnderline cterm=bold,underline gui=bold,underline - highlight! BoldItalic cterm=bold,Italic gui=bold,italic - highlight! Todo cterm=bold gui=bold guibg=#ffffaa guifg=#000000 - highlight! Error cterm=NONE ctermbg=NONE gui=NONE guibg=NONE - highlight! SpellBad cterm=NONE gui=undercurl guibg=NONE guifg=red - highlight! Ignore cterm=NONE ctermbg=NONE ctermfg=NONE gui=NONE guibg=NONE guifg=NONE - highlight! LineNr cterm=italic gui=italic - highlight! PmenuThumb cterm=inverse - highlight! MoreMsg cterm=inverse - - highlight! link qfSeparator Normal | " reserve one space - highlight! link qfLineNr Normal | " informational line numbers should look different - highlight! link SpecialKey NonText | " makes tab stop (see listchars) less disturbing - highlight! link WildMenu Search - highlight! link Convention Error - highlight! link PmenuSbar Pmenu - highlight! link VertSplit LineNr - highlight! link SignColumn LineNr - highlight! link ALEErrorSign LineNr - highlight! link FoldColumn VertSplit - highlight! link Folded LineNr - highlight! link EndOfBuffer NonText - highlight! link DiagnosticHint Debug - highlight! link DiagnosticInfo Debug - highlight! link DiagnosticError Error - highlight! link DiagnosticWarn Debug - - - hi Comment gui=italic - hi Keyword gui=bold - - autocmd BufReadPost * syntax match Convention /\s*$/ -endfunction -autocmd ColorScheme * call ExtendColorTheme() - -if &term == "linux" - set notermguicolors -else - set termguicolors -endif - - -let g:PaperColor_Theme_Options = { - \ 'theme': { - \ 'default.dark': { - \ 'transparent_background': 1 - \ }, - \ 'default.light': { - \ 'transparent_background': 1 - \ } - \ } - \ } - -set background=dark -colorscheme PaperColor diff --git a/plugin/max-set-window-title.vim b/plugin/max-set-window-title.vim deleted file mode 100644 index 1838f03..0000000 --- a/plugin/max-set-window-title.vim +++ /dev/null @@ -1,22 +0,0 @@ - - -augroup SET_WINDOW_TITLE - set title - set titlelen=40 - - " set window title for screen(3) - " if &term == "screen" || &term == "xterm" - if &term == "screen" - set t_ts=k - set t_fs=\ - endif - - " autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]" - " autocmd CursorHold * let &titlestring = "%t %y ".$USER."@".hostname().":%{expand("%:~:.:h")}" - set titlestring=\ %F - " Fix terminal title ================================================================================================= - " autocmd VimEnter * let &t_EI .= "\[0 q" - " autocmd VimEnter * let &t_SI = "\]12;green\x7" - autocmd VimLeave * silent !echo -ne "\033]112\007" -augroup END - diff --git a/plugin/netrw.vim b/plugin/netrw.vim deleted file mode 100644 index 57d6d50..0000000 --- a/plugin/netrw.vim +++ /dev/null @@ -1,16 +0,0 @@ -augroup NETRW - " Deprecated with this configuration, but still useful when deactivating some Plugins - " NETRW: obsolete with NERDTree - let g:netrw_alto = 0 | " open files on the right - let g:netrw_altv = 1 | " open files on the right - let g:netrw_banner = 0 | " display help messages? - let g:netrw_browse_split = 4 | " 4=open in previous window - let g:netrw_fastbrowse = 2 | " manually refresh direcory list (avoids display errors) - let g:netrw_hide = 1 | " show not-hidden files only - let g:netrw_keepdir = 1 | " because that works better, when gf finds a path name - let g:netrw_list_hide = '^\..*' | " Explore mode: hide files starting with dot - let g:netrw_liststyle = 3 | " 3=tree - let g:netrw_preview = 0 | " - let g:netrw_winsize = 20 | " window size in percent - " let s:treedepthstring = "│ " | " this is not going to work, but left here for documentation -augroup END diff --git a/plugin/vimdiff.vim b/plugin/vimdiff.vim deleted file mode 100644 index ffd9f46..0000000 --- a/plugin/vimdiff.vim +++ /dev/null @@ -1,4 +0,0 @@ -if &diff " only for diff mode/vimdiff - set diffopt=filler,context:1000000 " filler is default and inserts empty lines for sync - set foldmethod=syntax -endif diff --git a/plugin/youcompleteme.vim b/plugin/youcompleteme.vim deleted file mode 100644 index a241dae..0000000 --- a/plugin/youcompleteme.vim +++ /dev/null @@ -1,21 +0,0 @@ -augroup YOUCOMPLETEME - let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar/sign column - let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar/sign coloumn - - let g:ycm_autoclose_preview_window_after_insertion = 0 - let g:ycm_auto_trigger = 1 - let g:ycm_collect_identifiers_from_tags_files = 0 " Let YCM read tags from Ctags file - let g:ycm_confirm_extra_conf = 0 " security is overrated ;) - let g:ycm_always_populate_location_list = 0 " we can manually run :YcmDiags to do that - - let g:ycm_key_list_previous_completion = ['Up'] - let g:ycm_key_list_select_completion = ['Down'] - - "" let g:ycm_semantic_triggers = - "" \ { - "" \ 'c': [ 're!\w{2}' ] - "" \ } " per language configurations - " packadd YouCompleteMe -augroup END - - diff --git a/utils/Xresources b/utils/Xresources deleted file mode 100644 index 08969ac..0000000 --- a/utils/Xresources +++ /dev/null @@ -1,192 +0,0 @@ -#include "/home/max/.local/share/base16/base16-xresources/xresources/base16-tomorrow-night.Xresources" -! #include "/home/max/.local/share/base16/base16-xresources/xresources/base16-tomorrow.Xresources" - -urxvt.scrollBar: false -urxvt.background: base00 -urxvt.color0: base00 -urxvt.color1: base00 -urxvt.color2: base00 -urxvt.color3: base00 -urxvt.color4: base00 -urxvt.color5: base00 -urxvt.color6: base00 -urxvt.color7: base00 -urxvt.color8: base00 -urxvt.color9: base00 - -! *Dialog.foreground: foreground -! *Dialog.background: base00 -! *Dialog.Button.foreground: base05 -! *Dialog.Button.background: base00 -! !*Dialog.Button.pointBackground: #EAEAEA -! !*Dialog.Button.clickBackground: #C3C3C3 -! *Dialog.text.foreground: base02 -! *Dialog.text.background: base00 -! *Dialog.topShadowColor: base03 -! *Dialog.bottomShadowColor: base04 - -xscreensaver.logFile:/home/max/xscreensaver.log -xscreensaver.verbose:true -*.newLoginCommand: xset dpms force off - -Xft.antialias: true -Xft.lcdfilter: lcddefault -Xft.hinting: true -Xft.rgba: rgb -Xft.hintstyle: hintfull -Xft.dpi: 96 - -!*passwd.passwdFont: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1 -!*passwd.passwdFont: - -!*font: -*-clean-medium-r-*--12-*-*-*-*-*-*-* -!*font: xft:Bitstream Vera Sans Mono-8 -!*font: *-dejavu sans-bold-r-*-*-*-*-*-*-*-*-*-* -!*font: *-monospace-bold-r-*-*-*-*-*-*-*-*-*-* -!*.font: xft:monaco:bold:size=8 -!*.font: xft:RobotoMono Nerd Font:bold:size=10 -*.passwdFont: xft:monospace -*.font: xft:monospace - - -xscreensaver.overlayTextForeground: #FFFF00 -xscreensaver.overlayTextBackground: #000000 - - -*passwd.thermometer.foreground: #FF0000 -*passwd.thermometer.background: #FFFFFF - -*passwd.heading.label: XScreenSaver %s -*passwd.body.label: This screen is fucked. -*passwd.unlock.label: unfuck -*passwd.login.label: dpms: off -*passwd.user.label: User: -*passwd.thermometer.width: 12 -*passwd.asterisks: True -*passwd.uname: False - - -XLock*mode: image -*image.bitmap: /home/max/.lock.xpm -*image.count: 1 -*image.erasedelay: 0 -XLock*erasedelay: 0 -XLock*icongeometry: 180x180 -! XLock*background: background -! XLock*foreground: foreground -XLock*description: off -XLock*info: - - - - -! ---=== Experiment with making Motif less ugly for DDD ===--- -! (DDD ignores generically-set Motif properties so we must do this) -! TODO (if possible): -! - Hide text cursors in unfocused fields -! - Convert on-hover effect from shadow to background color or border -! - Pick better fonts and check which package provides them - -! Use the lighter background grey from the Lubuntu GTK+ theme -! (Still a cool grey. Eyedropper the Clearlooks warm grey if necessary.) -Ddd*background: #e0e0e0 - -! These had no effect on my system but, from what I read, they help on -! some systems. -Ddd*enableThinThickness: True -Ddd*enableEtchedInMenu: True -Ddd*enableToggleColor: True -Ddd*enableToggleVisual: True - -! Use pure white for white backgrounds like modern widget themes and websites -Ddd*XmText.background: #ffffff -Ddd*XmTextField.background: #ffffff -Ddd*XmList.background: #ffffff -Ddd*GraphEdit.background: #ffffff - -! Thick borders and shadows everywhere are archaic -Ddd*shadowThickness: 1 -Ddd*borderThickness: 0 -Ddd*?*arg*shadowThickness: 1 -Ddd*?*arg*borderThickness: 0 -Ddd*?*buttons*shadowThickness: 1 -Ddd*?*buttons*borderThickness: 0 - -! Un-cramp the menubar, menus, and toolbar to match modern compact sizing -Ddd*menubar*marginTop: 1 -Ddd*menubar*marginBottom: 0 -Ddd*XmMenuShell*marginTop: 2 -Ddd*XmMenuShell*marginBottom: 2 -Ddd*XmMenuShell.?.marginWidth: 2 -Ddd*XmMenuShell.?.marginHeight: 2 -Ddd*toolbar*marginWidth: 5 - -! Compact the menu tear-off buttons -Ddd*XmMenuShell*XmTearOffButton*borderWidth: 0 -Ddd*XmMenuShell*XmTearOffButton*marginHeight: 0 - -! DDD's interpretation of a "toggle button" shouldn't have a raised border -Ddd*XmToggleButton*shadowThickness: 0 -Ddd*XmToggleButton*borderThickness: 0 - -! The menu bar should not have a raised border -Ddd*menubar.shadowThickness: 0 -Ddd*menubar.borderThickness: 0 -Ddd*XmMenuShell*XmTearOffButton*ShadowThickness: 2 - -! ...and we do not want a border around the toolbar to make that stand out -Ddd*main_window.?.borderThickness: 0 -Ddd*main_window.shadowThickness: 0 - -! Drop-down boxes in toolbars do not have raised borders these days -Ddd*toolbar.shadowThickness: 0 -Ddd*toolbar.?.shadowThickness: 1 - -! DDD can sometimes get its GDB settings fatally messed up so duplicate -! GUI-exposed integration defaults here for when I want to nuke ~/.ddd/init -Ddd*cutCopyPasteBindings: KDE -Ddd*selectAllBindings: KDE -Ddd*buttonColorKey: c -Ddd*FlatButtons: on - - -! Good Xaw3d Defaults*customization: -color -*shadowWidth: 3 -*Form.background: gray75 -*MenuButton.background: gray75 -*SimpleMenu.background: gray70 -*TransientShell*Dialog.background: gray70 -*Command.background: gray75 -*Label.background: gray75 -*ScrollbarBackground: grey39 -*Scrollbar*background: gray75 -*Scrollbar*width: 15 -*Scrollbar*height: 15 -*Scrollbar*shadowWidth: 2 -*Scrollbar*cursorName: top_left_arrow -*Scrollbar*pushThumb: false -*shapeStyle: Rectangle -*beNiceToColormap: False -*SmeBSB*shadowWidth: 3 -*highlightThickness: 0 -*topShadowContrast: 40 -*bottomShadowContrast: 60 -! fix up a few of the default X clients who -! now look silly -*xclock*shadowWidth: 0 -*xload*shadowWidth: 0 -*xcalc*shadowWidth: 0 - - -XTerm.vt100.faceName: Monospace:antialias=true -XTerm.vt100.faceSize: 12 -! XTerm.vt100.font: 7x14 -XTerm.vt100.locale: true -XTerm.vt100.utf8Title: true - - -! keepassx colourscheme -keepassx*background: #cfcfcf -keepassx*foreground: #222222 -keepassx2*background: #cfcfcf -keepassx2*foreground: #222222 diff --git a/utils/applications/gvim-buffer.desktop b/utils/applications/gvim-buffer.desktop deleted file mode 100644 index 5cd2cbf..0000000 --- a/utils/applications/gvim-buffer.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Gnome Vi IMproved Buffer -Icon=gvim -Comment=Open file in an existing instance of vi and in a new tab -MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; -Exec=gvim -f -N --remote-silent %F -Terminal=false -X-XClassHintResName=VIM -Categories=Utility;TextEditor; diff --git a/utils/applications/gvim.desktop b/utils/applications/gvim.desktop deleted file mode 100644 index 37c6e58..0000000 --- a/utils/applications/gvim.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Vi IMproved Tab -Comment=Open file in an existing instance of vi and in a new tab -MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; -Exec=gvim f -N --remote-tab %F -Icon=gvim -Type=Application -Terminal=false -X-XClassHintResName=VIM -Categories=Utility;TextEditor; diff --git a/utils/applications/nvim.desktop b/utils/applications/nvim.desktop deleted file mode 100644 index 21f0090..0000000 --- a/utils/applications/nvim.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=Vim -Comment= -Exec=xfce4-terminal --icon /usr/share/icons/HighContrast/256x256/apps/vim.png -T 'nvim' -e '/bin/bash -i -c "env TERM=gnome-256color screen nvr ."' --fullscreen -Icon=/usr/share/icons/HighContrast/256x256/apps/vim.png -Path= -Terminal=false -StartupNotify=false diff --git a/utils/applications/vim.desktop b/utils/applications/vim.desktop deleted file mode 100755 index 8169f57..0000000 --- a/utils/applications/vim.desktop +++ /dev/null @@ -1,15 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=Vi IMproved -Comment=Open file in an existing instance of vi and in a new tab -Icon=gvim -MimeType=text/* -Categories=Application;Utility;TextEditor; -Exec=vim %F -Terminal=true -Actions=Server; - -[Desktop Action Server] -Exec=vim --servername VIM --remote-silent %F -Name=Browse in Server diff --git a/utils/bashrc b/utils/bashrc deleted file mode 100644 index f0ee98b..0000000 --- a/utils/bashrc +++ /dev/null @@ -1,46 +0,0 @@ - -# gvim () { /bin/gvim $(if [[ "$#" > 0 && `/bin/gvim --serverlist | wc -l` ]]; then echo --remote; fi) $@; } -# vim () { /bin/vim $(if [[ "$#" > 0 && `/bin/vim --serverlist | wc -l` ]]; then echo --remote; fi) $@; } - -# man() -# { -# /bin/gvim \ -# $(if [[ `/bin/gvim --serverlist | wc -l` > 0 ]]; then echo --remote-send; fi) \ -# ":enew:0read !groffer --pager='cat' --tty $1 col -bx :set filetype=man buftype=nowrite readonlygg"; -# } - -# export MANPAGER='vim -c":set noswapfile|%!col -b" -c":file man|:setlocal filetype=man buftype=nowrite readonly nonumber nolist signcolumn=no" -' -export MANPAGER="vim -M +MANPAGER -" - -# man() { /bin/vim ":enew:0read !groffer --pager='cat' --tty $1 col -bx :set filetype=man buftype=nowrite readonlygg" -; } -# alias git='git -c color.ui=false' -# export GIT_DIFF_OPTS="--no-color" - - - -git config --global --replace-all color.pager 0 -git config --global --replace-all core.pager 'vim -c":set noswapfile filetype=git buftype=nowrite readonly nolist nonumber signcolumn=no|:file git" -' -# export GIT_PAGER='' - -# alias git="TERM=dumb git" - -# export EDITOR="gvim()" -# export PAGER="tee /tmp/output.txt /dev/stdout | /bin/vim -" - -# --remote-expr ":%!col -b" -c":set buftype=nowrite filetype=man readonly" -'A - -function vim() { - SERVER=$(ls -tr "$XDG_RUNTIME_DIR"/nvim.* | tail -n1) - if [ $# -gt 0 ] && [ -n "$SERVER" ]; then - for i in "$@"; do - NEXT=$(realpath "$i") - nvim --server "$SERVER" --remote-silent "$NEXT" - done - else - nvim $@ - fi - -} - - - diff --git a/utils/default-font.conf b/utils/default-font.conf deleted file mode 100644 index f905783..0000000 --- a/utils/default-font.conf +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - monospace - - - FuraCode Nerd Font Mono Medium - FiraCode Nerd Font - FuraCode Nerd Font - Noto Color Emoji - - - liga on - dlig on - - italic - bold - - - - - - - Symbola - - - - - - serif - - Noto Serif - - - - sans-serif - - Noto Sans - - - - 102 - - - - - Tahoma - - - Sans-Serif - - - - diff --git a/utils/default-font.conf.old b/utils/default-font.conf.old deleted file mode 100644 index ec2e12e..0000000 --- a/utils/default-font.conf.old +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - serif - Noto Serif - - - sans-serif - Noto Sans - - - monospace - Hack - Noto Color Emoji - emoji - - italic - bold - - - diff --git a/utils/gtk-3.0.css b/utils/gtk-3.0.css deleted file mode 100644 index c31c8bf..0000000 --- a/utils/gtk-3.0.css +++ /dev/null @@ -1,132 +0,0 @@ -/* name or link this file ~/.config/gtk-3.0/gtk.css */ - -/* -#vim-menubar, -#vim-menubar #menu, -#vim-toolbar, -#vim-gui-drawarea, -#vim-main-window { - color:#6060af; - color: #4e4e4e; - font-family: "Hasklug Nerd Font Mono", "Source Code Pro for Powerline", "Source Code Pro", "Roboto"; - font-weight:bold; - font-size:8pt; - border:0; - outline:0; -} - -* { - border-width:0px; - outline-width:0px; - padding:0; - margin:0; -} - -#vim-menubar -{ - padding-left:1em; - border-bottom:2px solid #ffffff; -} - -#vim-menubar>* -{ - padding-right:1em; - padding-top:.25em; - padding-bottom:.25em; -} - -#vim-menubar>*, -#vim-main-window { - background-color:#ffffff; - color: #4e4e4e; -} - -menu menuitem:backdrop, menu menuitem:backdrop:hover -{ - border:0px; -} -*/ - - - -window#vim-main-window > box -{ - background: currentColor; - border:2px solid transparent; -} - -/* within window > box ... */ -menubar#vim-menubar { - font-family: "monospace"; - font-size:8pt; - background: transparent; - color:lighter(currentColor); - /* background: linear-gradient(180deg, white 85%, black); */ -} - -menubar#vim-menubar menuitem { - background:transparent; - color:mix(currentColor,#fff,0.5); -} - - - -menubar#vim-menubar > menuitem { - padding:.25em; -} - -menubar#vim-menubar > menuitem:disabled accelerator -{ - color:#f00; -} - -menubar#vim-menubar menuitem box { - padding:.1em .25em; -} - -menubar#vim-menubar menuitem window -{ - margin-top:1em; -} - -/* opened menu (after being clicked) */ -menubar#vim-menubar menuitem window menu { - background:lighter(currentColor); - padding:0; - margin:0; - border:0; -} - -menubar#vim-menubar menuitem window menu menuitem { - padding:0em; - margin:0px; - border:0px; -} - -menubar#vim-menubar menuitem window menu menuitem box { - padding:.25em; - padding-left:.5em; -} - -menubar#vim-menubar menuitem window menu separator { - margin:0; - background:currentColor; - border-top:1px dotted #666; -} - - -menubar#vim-menubar menuitem:hover { - box-shadow:none; - background:darker(currentColor); - color:#fff; -} - - - - - - -/* -toolbar button { -notebook tab { -*/ diff --git a/utils/gtkrc-2.0 b/utils/gtkrc-2.0 deleted file mode 100644 index 05caadc..0000000 --- a/utils/gtkrc-2.0 +++ /dev/null @@ -1 +0,0 @@ -gtk-icon-theme-name="gnome" diff --git a/utils/locale.conf b/utils/locale.conf deleted file mode 100644 index cd2bb00..0000000 --- a/utils/locale.conf +++ /dev/null @@ -1,14 +0,0 @@ -LANG=de_DE.utf8 -LC_CTYPE=de_DE.utf8 -LC_NUMERIC=de_DE.utf8 -LC_TIME=de_DE.utf8 -LC_COLLATE=C -LC_MONETARY=de_DE.utf8 -LC_MESSAGES=de_DE.utf8 -LC_PAPER=de_DE.utf8 -LC_NAME=de_DE.utf8 -LC_ADDRESS=de_DE.utf8 -LC_TELEPHONE=de_DE.utf8 -LC_MEASUREMENT=de_DE.utf8 -LC_IDENTIFICATION=de_DE.utf8 -LC_ALL=de_DE.utf8 diff --git a/utils/update.sh b/utils/update.sh deleted file mode 100644 index 875dc89..0000000 --- a/utils/update.sh +++ /dev/null @@ -1 +0,0 @@ -git submodule update --remote --checkout --recursive --force diff --git a/utils/xinputrc b/utils/xinputrc deleted file mode 100644 index ebd7310..0000000 --- a/utils/xinputrc +++ /dev/null @@ -1,3 +0,0 @@ -# im-config(8) generated on Tue, 28 Feb 2017 13:21:48 +0100 -run_im ibus -# im-config signature: ec6901ebc5d2dcf71d14062c6968658e - diff --git a/vimrc b/vimrc index 424f5f0..f3b1833 100644 --- a/vimrc +++ b/vimrc @@ -1,33 +1,389 @@ -exec ':source '.fnamemodify($MYVIMRC,':h').'/'.'vimrc-common' -set packpath+=pack/submodules +"======================================================================================================================= +" GENERAL +"======================================================================================================================= -if has("nvim") - set shadafile="/tmp/shada" +filetype on +filetype plugin on +filetype indent on + +syntax on | " enable syntax highlighting +syntax sync minlines=60 | " how many preceding lines will be parsed? (high performance impact) + +set secure | " to ensure, that modelines do not contain executable code +set noexrc | " exrc was nice, but has too many security problems. Now using editorconfig instead (see plugins) +set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig) +set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against +set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis +set ignorecase smartcase | " search with ignore case by default, but use case sensitive search when one capital char is contained and highlight while typing (even though its slower) +set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good) + + +"======================================================================================================================= +" BASIC CODE STYLE +"======================================================================================================================= +" set cindent cinoptions+=(0 | " indents at the level of parentheses -- if desired +set expandtab | " replace tabs with spaces +set textwidth=0 | " should be set file type specific, colorcolumns is there to assist anyways +set tabstop=4 +set shiftwidth=4 +set softtabstop=4 + +"======================================================================================================================= +" PATH -- where to search for includes (e.g. `gf` or `:find`) +"======================================================================================================================= +set path+=**4 | " allow recursive searches for files (limit depth by 4) +if executable("uname") " does not work under Windows + let &path = &path.",/usr/lib/modules/".substitute(system('uname -r'), "\n", "", "")."/build/include" +endif + +if filereadable("/bin/bash") + set shell=/bin/bash +elseif filereadable("/usr/local/bin/bash") + set shell=/usr/local/bin/bash +elseif has("win32") + set shell="cmd.exe" +endif + +" ====================================================================================================================== +" SETTINGS: +" ====================================================================================================================== +set breakindent | " Every wrapped line will continue visually indented +set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well) +set concealcursor=nc | " limits the display of concealed text to normal and command mode +set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX) +set confirm | " asks 'do you want to save?' +set cpoptions+=P | " makes :w filename set the current buffer to filename +set hidden | " allows switching buffers even if the current buffer contains changes (displays +) +set linebreak | " wrap long lines at char 'breakat', not inside words +set mousemodel=popup | " only in gvim: right click opens a pop-up-menu +set mouse=n | " allow mouse in normal mode only, so one can use the terminals c&p feature in insert mode +set noautochdir | " When on, Vim will change the current working directory +set nostartofline | " when scrolling: do not move the cursor to column 1 +set nowrap | " but do not (by default) wrap long lines around +set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers + +set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for +set scrolljump=4 | " how many lines get scrolled into view when cursor reaches the screens edge +set scrolloff=4 | " keeps cursor centered +set shiftround | " indent/un-indent snaps to multiple of shiftwidths +set writedelay=0 + +" display and performance +set lazyredraw | " disables redraw during macro execution (improves performance, but causes problems with solid backgrounds) +set cmdheight=2 | " sets the command line's height +set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators +set nocursorcolumn | " turn visual cursor column off (improves performance) +set updatetime=80 | " updates the screen more often +set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry +set notimeout | " improves performance but is known to cause problems on slow terminals +set ttimeout ttimeoutlen=150 | " set Esc key timeout in ms- +set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering) +set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always +set shortmess+=I | " don't give the intro message when starting Vim |:intro|. +set wildmenu | " use a menu in the command line +set wildmode=longest:full | " do not preselect any entry and show all possible + +" code completion +" set dictionary=/usr/share/dict/cracklib-small +set isfname-== | " remove = as char in filenames, because most FSs do not support it +set complete+=d | " scan current and included files for defined name or macro +set complete+=i | " scan current and included files for completions +set complete+=k | " make default completer respect the dictionary +set complete-=u | " scan current and included files +set complete+=i | " scan current and included files +set complete+=d | " scan current and included files for defined name or macro +" set complete=d | " scan current and included files for defined name or macro +set completeopt+=noinsert | " Do not insert any text for a match until the user selects one +set completeopt+=noselect | " Do not select a completion from the menu, let the user do that +set tagcase=match | " tagcase match, because we mostly use ^] to jump around and that variant respects the upper/lower case [followscs, followic, match, ignore] +set tags+=../tags + +" code folding... +set nofoldenable | " disable folding, because we have zi to toggle foldenable :) +set foldclose=all | " automatically fold, when the cursor leaves the folded area +set foldcolumn=0 | " I think I don't need this second indicator +" set numberwidth=5 +" set foldmethod=syntax | " foldlevel: syntax, indent, manual / foldmethod=syntax makes Vim incredible slow +set foldnestmax=1 | " top level folding only +set foldopen=block,hor,search | " when do we unfold? +" set foldtext=printf('%*s%.*S',indent(v:foldstart),'',&textwidth-indent(v:foldstart),substitute(substitute(join(getline(v:foldstart,v:foldend),'\ '),'[[:space:]*/]\\+','\ ','g'),'^[[:space:]*]','','g')) +set foldtext=repeat('\ ',indent(v:foldstart)-1).join(getline(v:foldstart,v:foldend))[:winwidth(0)]->substitute('[[:space:]]\\+','\ ','g') + +" works ... +" set foldexpr=match(synIDattr(synID(v:lnum,indent(v:lnum)+1,0),'name'),'Comment')>-1 +set foldexpr=!empty(filter(synstack(v:lnum,indent(v:lnum)+1),{_,val->match(synIDattr(val,'name'),'Comment')>-1})) + +" vim window behaviour +set splitbelow | " open new windows below the current one (i find that more intuitive) +set splitright | " this also works for me and makes better use of the scren space I think +set winminwidth=0 | " (and all other windows, so TODO: watch out) +set winwidth=30 | " keep NERDTreeWindow at least this size + +" vim session handling and restore behaviour +set viminfo+=% | " restore buffer list +set sessionoptions= +set sessionoptions+=buffers +set sessionoptions+=curdir +set sessionoptions+=folds +set sessionoptions+=resize +set sessionoptions+=slash +set sessionoptions+=tabpages +set sessionoptions+=unix +set sessionoptions+=winpos +set sessionoptions+=winsize + +" set nocindent smartindent | " use smart indent rather then cindent +set noautoindent +set nosmartindent + +set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths +set noequalalways | " do not evenly size windows when opening new or closing old +set nocursorline | " turn visual cursor line off (improves performance) + +"======================================================================================================================= +" SPELL_CHECKING: +"======================================================================================================================= +let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell' +" add local user default spell file as primary source for words +let &spellfile=fnamemodify($MYVIMRC, ":p:h")."/spell/spellfile-user.UTF-8.add" + +set nospell | " disable spell checker by default +set spelllang=en,de | " languages for the spell checker +set spellsuggest=10 | " how many words will z= suggest? +set thesaurus+=~/.vim/thesaurus/php.txt + +if &diff " only for diff mode/vimdiff + set diffopt=filler,context:1000000 " filler is default and inserts empty lines for sync + set foldmethod=syntax +endif + +"======================================================================================================================= +" UNDO: +" Persistent undo behaviour, also keeps undo history between starts +"======================================================================================================================= +if has('persistent_undo') + if isdirectory('/dev/shm') + set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undoes + set directory=/dev/shm/ | " swap file directory to RAM + set swapfile + elseif isdirectory('/tmp/') + set undodir=/tmp/ + endif + set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistence) endif -if exists("g:neovide") - " neovide specific - set guifont=monospace:h11:b - " :#e-subpixelantialias:#h-full - let g:neovide_cursor_animation_length=0.03 - let g:neovide_cursor_trail_size=0.8 - let g:neovide_scroll_animation_length = 0.05 - let g:neovide_transparency = 0.9 + +"======================================================================================================================= +" DISPLAY & MULTI_BYTE +"======================================================================================================================= +if has("multi_byte") + scriptencoding utf-8 | " tell vim that we are using UTF-8 here + set encoding=utf-8 | " we need default UTF-8 encoding to use cool chars as line break and so on (see below) + set termencoding=utf-8 | " we just assume that this is supported. + + set fillchars= | " initialize empty fillchars + set listchars= | " initialize empty listchars + + if &term ==# 'linux' + set fillchars+=vert:\│ | " cool vertical split char + else + set fillchars+=vert:\║ | " cool vertical split char + endif + + set fillchars+=fold:\ | " + set fillchars+=diff:\ | " a white space gets used here + + set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars) + set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars) + + set listchars+=tab:▏\ | " + 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 + + " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective) + set nolist + + autocmd InsertEnter * set list + autocmd InsertLeave * set list& + + autocmd InsertEnter * set colorcolumn=80,120 + autocmd InsertLeave * set colorcolumn& + " set fillchars+=stlnc:\― | " +end + + +"======================================================================================================================= +" AUTOCMDs and FileType specific stuff +"======================================================================================================================= +if has("autocmd") + " use the shada/viminfo file to return the cursor to where it was... + autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif + + " Workaround: Allows Vim to yank text within wayland + " XDG_SESSION_TYPE is only set if a login manager was used + " WAYLAND_DISPLAY should always work + " if ($XDG_SESSION_TYPE ==# 'wayland' || ! empty($WAYLAND_DISPLAY)) && !has('nvim') + " autocmd TextYankPost * call system("wl-copy", getreg('+')) + " endif + + autocmd TextYankPost * echo '> text yanked to '. + \ (get(v:event,'regname') == '' + \ ? 'default register' + \ : 'register '.get(v:event,'regname')) + + + autocmd InsertLeave * silent! call matchadd('Convention', ' \+$', -1, 101, { 'conceal': '⟶' }) + autocmd InsertEnter * silent! call matchdelete(101) + + + "==================================================================================================================== + augroup FILETYPES + " indent within