aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Christian Pohle2024-05-12 21:01:00 +0200
committerMax Christian Pohle2024-05-12 21:01:00 +0200
commiteec48ff71881d8757b79dcd95aac9dac4d71bf72 (patch)
tree8e21c80a8fecbcf7a6b36c3db1d2aa061bda1959
parentf3eb203b4ad79090e36982e7b417c0cf0de52646 (diff)
downloadvim-eec48ff71881d8757b79dcd95aac9dac4d71bf72.tar.bz2
vim-eec48ff71881d8757b79dcd95aac9dac4d71bf72.zip
tidied this repo up and uploaded my new nvim from scratch config
-rwxr-xr-x[-rw-r--r--]README.md (renamed from doc/shortcuts.txt)94
-rwxr-xr-x[-rw-r--r--]after/ftdetect/log.vim0
-rw-r--r--after/ftplugin/javascript.vim1
-rwxr-xr-x[-rw-r--r--]after/ftplugin/python.vim0
-rwxr-xr-x[-rw-r--r--]after/indent/html5.vim0
-rwxr-xr-x[-rw-r--r--]after/indent/php.vim0
-rwxr-xr-x[-rw-r--r--]after/indent/yaml.vim0
-rwxr-xr-x[-rw-r--r--]after/syntax/c.vim0
-rwxr-xr-x[-rw-r--r--]after/syntax/log.vim0
-rwxr-xr-x[-rw-r--r--]after/syntax/markdown.vim0
-rw-r--r--doc/coderonline-vim.pngbin91868 -> 0 bytes
-rw-r--r--doc/git2
-rw-r--r--doc/git.txt3
-rw-r--r--doc/gtk.css7
-rw-r--r--doc/list-of-filetypes.txt175
-rw-r--r--doc/readme.md15
-rw-r--r--doc/screen.txt9
-rw-r--r--gvimrc2
-rw-r--r--init-mini.lua90
-rw-r--r--init.lua308
m---------pack/all/start/fzf0
m---------pack/all/start/fzf.vim0
m---------pack/all/start/vim-colorscheme-papercolor0
m---------pack/all/start/vim-editorconfig0
m---------pack/all/start/vim-fancy-line0
m---------pack/all/start/vim-karlmarks0
m---------pack/all/start/vim-mercenary0
m---------pack/all/start/vim-recently-used0
m---------pack/all/start/vim-under-the-cursor0
m---------pack/nvim/start/nvim-cmp0
m---------pack/nvim/start/nvim-cmp-buffer0
m---------pack/nvim/start/nvim-cmp-lsp-signature-help0
m---------pack/nvim/start/nvim-cmp-nvim-lsp0
m---------pack/nvim/start/nvim-colorizer0
m---------pack/nvim/start/nvim-lsp0
m---------pack/nvim/start/nvim-lspconfig0
m---------pack/nvim/start/nvim-lua-language-server0
m---------pack/nvim/start/nvim-plenary0
m---------pack/nvim/start/nvim-telescope0
m---------pack/nvim/start/nvim-treesitter0
m---------pack/nvim/start/nvim-vsnip0
m---------pack/vim/opt/vim-youcompleteme0
-rw-r--r--plugin/lsp.nvim1
-rw-r--r--plugin/max-find-shell.vim11
-rw-r--r--plugin/max-fix-colorschemes.vim62
-rw-r--r--plugin/max-set-window-title.vim22
-rw-r--r--plugin/netrw.vim16
-rw-r--r--plugin/vimdiff.vim4
-rw-r--r--plugin/youcompleteme.vim21
-rw-r--r--utils/Xresources192
-rw-r--r--utils/applications/gvim-buffer.desktop10
-rw-r--r--utils/applications/gvim.desktop10
-rw-r--r--utils/applications/nvim.desktop10
-rwxr-xr-xutils/applications/vim.desktop15
-rw-r--r--utils/bashrc46
-rw-r--r--utils/default-font.conf82
-rw-r--r--utils/default-font.conf.old49
-rw-r--r--utils/gtk-3.0.css132
-rw-r--r--utils/gtkrc-2.01
-rw-r--r--utils/locale.conf14
-rw-r--r--utils/update.sh1
-rw-r--r--utils/xinputrc3
-rw-r--r--vimrc412
-rw-r--r--vimrc-common379
64 files changed, 757 insertions, 1442 deletions
diff --git a/doc/shortcuts.txt b/README.md
index 5e911ea..2d5747f 100644..100755
--- a/doc/shortcuts.txt
+++ b/README.md
@@ -1,3 +1,53 @@
1# Installation
2```
3git clone http://git.entwicklerseite.de/vim ~/.config/nvim/
4```
5
6# Overview
7
8- init.lua :: my every day neovim config. It sources my vimrc (see below)
9
10- init-mini.lua :: if you want to start from scratch this is a good start. It
11 sets up nvim with a language server to support the creation of a new config.
12
13- vimrc :: commented version of a vimrc with sane defaults
14
15
16```
17 .
18├──  after
19│ ├──  ftdetect
20│ │ └──  log.vim
21│ ├──  ftplugin
22│ │ └──  python.vim
23│ ├──  indent
24│ │ ├──  html5.vim
25│ │ ├──  php.vim
26│ │ └──  yaml.vim
27│ └──  syntax
28│ ├──  c.vim
29│ ├──  log.vim
30│ └──  markdown.vim
31├──  gvimrc
32├──  init-mini.lua
33├──  init.lua
34├──  README.md
35└──  vimrc
36```
37
38
39# Cheat sheet
40For different working scenarios.
41
42## vim
43
44- use `<C-d>` to expand autocompletion on the `:` command line. That works for
45 example for `:setfiletype <C-d>` to show all available filetypes.
46
47- use `gw` or `gq` in visual mode to break selected text at the current
48 textwidth (configured with `set textwidth=80` for example)
49
50```
1:viusage = summary of all keyboard shortcuts 51:viusage = summary of all keyboard shortcuts
2:options = shows currently :set options (with descriptions) 52:options = shows currently :set options (with descriptions)
3leader key = usually set to backslash expects a quick command 53leader key = usually set to backslash expects a quick command
@@ -202,5 +252,47 @@ gpm - cut and paste helper for the linux console (to get text from CTRL-ALT-F2 t
202[vim modeline] 252[vim modeline]
203filetype can have multiple values, like python.django 253filetype can have multiple values, like python.django
204The last line can be a mode line, which holds settings like tab width: 254The last line can be a mode line, which holds settings like tab width:
255```
256
257
258## git
259
260 undo last commit: git reset HEAD~
261 diff two branches: git diff branch1 branch2 path/to/file
262
263
264
265To `~/.gitconfig` add:
266 [alias]
267 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
268
269Provides you with `git branchvv`, a command that works similar to `git branch`,
270but sorts the branches by modification date and displays them.
271
272
273# gnu screen
274
275To run Vim in a gnu screen session:
276
277 TERM=vte-256color screen vim
278
279But if you are using another terminal there may be further options with even
280more capabilities. Starting point for you search could be something like:
281
282 find /usr/share/terminfo/ | grep screen | grep 256
283
284# gvim
285
286Change the default brackground of applications if you see an ugly grey border
287around your beatiful theme:
288
289```
290/* to be saved as ~/.config/gtk-3.0/gtk.css
291 * thanks to http://stackoverflow.com/users/6899000/proprefenetre */
292@define-color YOUR_BACKGROUND_COLOR #rrggbb;
293
294window#vim-main-window {
295 background-color: @YOUR_BACKGROUND_COLOR;
296}
297```
205 298
206# vim: noai:ts=2:sw=2 filetype=dosini.text
diff --git a/after/ftdetect/log.vim b/after/ftdetect/log.vim
index 8203171..8203171 100644..100755
--- a/after/ftdetect/log.vim
+++ b/after/ftdetect/log.vim
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 @@
1" set number
diff --git a/after/ftplugin/python.vim b/after/ftplugin/python.vim
index a5c454a..a5c454a 100644..100755
--- a/after/ftplugin/python.vim
+++ b/after/ftplugin/python.vim
diff --git a/after/indent/html5.vim b/after/indent/html5.vim
index 94baa87..94baa87 100644..100755
--- a/after/indent/html5.vim
+++ b/after/indent/html5.vim
diff --git a/after/indent/php.vim b/after/indent/php.vim
index ef723a6..ef723a6 100644..100755
--- a/after/indent/php.vim
+++ b/after/indent/php.vim
diff --git a/after/indent/yaml.vim b/after/indent/yaml.vim
index 3027571..3027571 100644..100755
--- a/after/indent/yaml.vim
+++ b/after/indent/yaml.vim
diff --git a/after/syntax/c.vim b/after/syntax/c.vim
index 4c3b3f0..4c3b3f0 100644..100755
--- a/after/syntax/c.vim
+++ b/after/syntax/c.vim
diff --git a/after/syntax/log.vim b/after/syntax/log.vim
index 44223e6..44223e6 100644..100755
--- a/after/syntax/log.vim
+++ b/after/syntax/log.vim
diff --git a/after/syntax/markdown.vim b/after/syntax/markdown.vim
index 7bdbf46..7bdbf46 100644..100755
--- a/after/syntax/markdown.vim
+++ b/after/syntax/markdown.vim
diff --git a/doc/coderonline-vim.png b/doc/coderonline-vim.png
deleted file mode 100644
index 156ff3a..0000000
--- a/doc/coderonline-vim.png
+++ /dev/null
Binary files 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 @@
1undo last commit: git reset HEAD~
2diff 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 @@
1GIT_PAGER=less git config --list | awk 'match($0, "submodule.(.*).url=(.*)",q){ system("echo git submodule add " q[2] " " q[1]) }'
2
3branchvv = 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 @@
1/* to be saved as ~/.config/gtk-3.0/gtk.css
2 * thanks to http://stackoverflow.com/users/6899000/proprefenetre */
3@define-color YOUR_BACKGROUND_COLOR #rrggbb;
4
5window#vim-main-window {
6 background-color: @YOUR_BACKGROUND_COLOR;
7}
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 @@
1# this list can be generated with ':setfiletype <C-d>'. I have copied it to
2# make it searchable.
3
42html erlang master sinda
5HGAnnotate eruby matlab sindacmp
6PKGBUILD esmtprc maxima sindaout
7a2ps esqlc mel sisu
8a65 esterel messages skill
9aap eterm mf sl
10abap euphoria3 mgl slang
11abaqus euphoria4 mgp slice
12abc eviews mib slim
13abel exim mix slpconf
14acedb expect mma slpreg
15ada exports mmix slpspi
16aflex falcon mmp slrnrc
17ahdl fan modconf slrnsc
18alsaconf fasm model sm
19amiga fdcc modsim3 smarty
20aml fetchmail modula2 smcl
21ampl fgl modula3 smil
22ansible fish monk smith
23ansible_hosts flexwiki moo sml
24ansible_template focexec mp snnsnet
25ant form mplayerconf snnspat
26antlr forth mrxvtrc snnsres
27apache fortran msidl snobol4
28apachestyle foxpro msmessages solidity
29aptconf framescript msql spec
30arch freebasic mupad specman
31arduino fstab mush spice
32art fvwm mustache splint
33asciidoc fvwm2m4 muttrc spup
34asm gdb mysql spyce
35asm68k gdmo named sql
36asmh8300 gedcom nanorc sqlanywhere
37asn git nasm sqlforms
38aspperl gitcommit nastran sqlhana
39aspvbs gitconfig natural sqlinformix
40asterisk gitolite ncf sqlj
41asteriskvm gitrebase netrc sqloracle
42atlas gitsendemail netrw sqr
43augeas gkrellmrc nginx squid
44autohotkey glsl nim srec
45autoit gnash ninja sshconfig
46automake gnomecat nix sshdconfig
47ave gnuplot nosyntax st
48avra go nqc stata
49awk godefstack nroff stp
50ayacc godoc nsis strace
51b gohtmltmpl obj stylus
52baan gotexttmpl objc sudoers
53basic gp objcpp svg
54bc gpg ocaml svn
55bdf gprof occam swift
56bib grads octave syncolor
57bib_latexSuite gretl omnimark synload
58bindzone groff opencl syntax
59blade groovy openroad sysctl
60blank group opl systemd
61bst grub ora systemverilog
62btm gsp pamconf tads
63bzl gtkrc papp tags
64bzr haml pascal tak
65c hamster passwd takcmp
66cabal handlebars pcap takout
67calendar haskell pccts tap
68catalog haste pdf tar
69cdl hastepreproc perl taskdata
70cdrdaoconf haxe perl6 taskedit
71cdrtoc haxe_extended pf tasm
72cf hb pfmain tcl
73cfg help pgsql tcsh
74ch hercules php teraterm
75chaiscript hex phtml terminfo
76change hgcommit pic tex
77changelog hitest pike tex_LatexBox
78chaskell hog pilrc tex_latexSuite
79cheetah hostconf pine texinfo
80chill hostsaccess pinfo texmf
81chordpro hss plaintex text
82cl html plantuml textile
83clean html5 pli tf
84clipper htmlcheetah plm thrift
85clojure htmldjango plp tidy
86cmake htmlm4 plsql tilde
87cmake-indent htmlos po tli
88cmake-syntax hxml pod tmux
89cmusrc ia64 postscr tomdoc
90cobol ibasic pov toml
91coco icemenu povini tpp
92coffee icon ppd trasys
93color_coded idl ppwiz treetop
94colortest idlang prescribe trustees
95conaryrecipe indent privoxy tsalt
96conf inform procmail tsscl
97config initex progress tssgm
98context initng prolog tssop
99cpp inittab promela tt2
100cql ipfilter proto tt2html
101crm ishd protocols tt2js
102crontab iss ps1 twig
103cryptol ist ps1xml typescript
104crystal j psf uc
105cs jal ptcap udevconf
106csc jam pug udevperm
107cscope_plus jargon puppet udevrules
108csdl jasmine purescript uil
109csh java purifylog updatedb
110csp javacc pyrex upstart
111css javascript python upstreamdat
112cterm jess qf upstreaminstalllog
113ctrlh jgraph qml upstreamlog
114cucumber jinja2 quake upstreamrpt
115cuda jovial r usserverlog
116cupl jproperties racc usw2kagtlog
117cuplsim json radiance vala
118cuda jovial r usserverlog
119cupl jproperties racc usw2kagtlog
120cuplsim json radiance vala
121cvs jsp ragel valgrind
122cvsrc jst ratpoison vb
123cweb jsx rc vbnet
124cynlib julia rcs vcl
125cynpp kconfig rcslog velocity
126d kivy readline vera
127dart kix rebol verilog
128datascript kotlin redif verilogams
129dcd kscript registry vgrindefs
130dcl kwt remind vhdl
131debchangelog lace resolv vim
132debcontrol latextoc reva vimgo
133debsources latte rexx viminfo
134def ld rhelp virata
135denyhosts ldapconf rib vmasm
136desc ldif rmd voscm
137desktop less rnc vrml
138dictconf lex rng vroom
139dictdconf lftp rnoweb vsejcl
140diff lhaskell robots vundlelog
141dircolors libao rpcgen wdiff
142dirpager lifelines rpl web
143diva lilo rrst webmacro
144django limits rspec wget
145dns liquid rst whitespace
146dnsmasq lisp rtf winbatch
147docbk lite ruby wml
148docbksgml litestep rust wsh
149docbkxml logcheck samba wsml
150dockerfile loginaccess sas wvdial
151dosbatch logindefs sass xbl
152dosini logtalk sather xdefaults
153dot lotos sbt xf86conf
154doxygen lout scala xhtml
155dracula lpc scala.xpt xinetd
156dsl lprolog scheme xkb
157dtd lscript scilab xmath
158dtml lsl screen xml
159dtrace lss scss xmodmap
160dts lua sd xpm
161dylan lynx sdc xpm2
162dylanintr m4 sdl xquery
163dylanlid mail sed xs
164ecd mailaliases sendpr xsd
165edif mailcap sensors xsl
166eelixir make services xslt
167eiffel mallard setserial xxd
168elf man sgml yacc
169elinks manconf sgmldecl yaml
170elixir manual sgmllnx z8a
171elm maple sh zimbu
172elmfilt markdown sicad zsh
173ember-script masm sieve
174emblem mason simula
175
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 @@
1vim configuration
2=================
3
4This is the configuration I am using.
5
6
7Screenshot
8----------
9
10<a href="/vim/plain/doc/coderonline-vim.png">
11 <img src="/vim/plain/doc/coderonline-vim.png" width="720" alt="screenshot of vim" />
12</a>
13
14
15
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 @@
1To run vim inside a screen session:
2
3TERM=vte-256color screen vim
4
5works very well. But if you are using another terminal you may be interested in
6other possibilities, like this:
7
8find /usr/share/terminfo/ | grep screen | grep 256
9
diff --git a/gvimrc b/gvimrc
index eda4fc7..2f9e8ec 100644
--- a/gvimrc
+++ b/gvimrc
@@ -28,3 +28,5 @@ if has("gui_running")
28 " like in the terminal: use Ctrl-shift-v for paste in vim's command editor 28 " like in the terminal: use Ctrl-shift-v for paste in vim's command editor
29 cnoremap <c-s-v> <c-r>* 29 cnoremap <c-s-v> <c-r>*
30endif 30endif
31
32source 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 @@
1local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
2if not (vim.uv or vim.loop).fs_stat(lazypath) then
3 vim.fn.system({
4 "git",
5 "clone",
6 "--filter=blob:none",
7 "https://github.com/folke/lazy.nvim.git",
8 "--branch=stable", -- latest stable release
9 lazypath,
10 })
11end
12vim.opt.rtp:prepend(lazypath)
13require("lazy").setup(plugins, opts)
14
15
16vim.opt.number = true
17
18vim.opt.shiftwidth = 2
19vim.opt.tabstop = 2
20vim.opt.softtabstop = 2
21
22
23require('gitsigns').setup()
24
25local cmp = require'cmp'
26cmp.setup({
27 snippet = {
28 -- REQUIRED - you must specify a snippet engine
29 expand = function(args)
30 require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
31 vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
32 end,
33 },
34 mapping = cmp.mapping.preset.insert({
35 ['<C-b>'] = cmp.mapping.scroll_docs(-4),
36 ['<C-f>'] = cmp.mapping.scroll_docs(4),
37 ['<C-Space>'] = cmp.mapping.complete(),
38 ['<C-e>'] = cmp.mapping.abort(),
39 ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
40 }),
41 sources = cmp.config.sources({
42 { name = 'nvim_lsp' },
43 { name = 'luasnip' }, -- For luasnip users.
44 }, {
45 { name = 'buffer' },
46 })
47})
48
49-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
50cmp.setup.cmdline({ '/', '?' }, {
51 mapping = cmp.mapping.preset.cmdline(),
52 sources = {
53 { name = 'buffer' }
54 }
55})
56
57-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
58cmp.setup.cmdline(':', {
59 mapping = cmp.mapping.preset.cmdline(),
60 sources = cmp.config.sources({
61 { name = 'path' }
62 }, {
63 { name = 'cmdline' }
64 }),
65 matching = { disallow_symbol_nonprefix_matching = false }
66})
67
68
69require'cmp'.setup {
70 sources = {
71 { name = 'nvim_lua' }
72 }
73}
74
75-- Set up lspconfig.
76local capabilities = require('cmp_nvim_lsp').default_capabilities()
77require("neodev").setup({
78 capabilities = capabilities,
79})
80-- Replace <YOUR_LSP_SERVER> with each lsp server you've enabled.
81require('lspconfig').lua_ls.setup({
82 capabilities = capabilities,
83 settings = {
84 Lua = {
85 diagnostics = {
86 globals = {'vim'}
87 }
88 }
89 }
90})
diff --git a/init.lua b/init.lua
index 2dc45ee..ce9d584 100644
--- a/init.lua
+++ b/init.lua
@@ -1,43 +1,165 @@
1vim.cmd('source ~/.vim/vimrc') 1--------------------------------------------------------------------------------
2-- lazy plugin manager
3--------------------------------------------------------------------------------
4local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
5if not (vim.uv or vim.loop).fs_stat(lazypath) then
6 vim.fn.system({
7 "git",
8 "clone",
9 "--filter = blob:none",
10 "https://github.com/folke/lazy.nvim.git",
11 "--branch = stable", -- latest stable release
12 lazypath,
13 })
14end
15vim.opt.rtp:prepend(lazypath)
16require("lazy").setup({
17 'nvim-tree/nvim-web-devicons',
18 'lewis6991/gitsigns.nvim',
19 'folke/neodev.nvim',
20 'neovim/nvim-lspconfig',
21 'hrsh7th/cmp-nvim-lsp',
22 'hrsh7th/cmp-buffer',
23 'hrsh7th/cmp-path',
24 'hrsh7th/cmp-cmdline',
25 'hrsh7th/nvim-cmp',
26 'hrsh7th/vim-vsnip',
27 'octaltree/cmp-look',
28 'L3MON4D3/LuaSnip',
29 'saadparwaiz1/cmp_luasnip',
30 'RRethy/base16-nvim',
31 'nvim-treesitter/nvim-treesitter',
32 'nvim-lua/popup.nvim',
33 'nvim-lua/plenary.nvim',
34 'nvim-telescope/telescope.nvim',
35 'nvim-telescope/telescope-media-files.nvim',
36 'coderonline/vim-fancy-line',
37 'coderonline/vim-recently-used',
38 'norcalli/nvim-colorizer.lua',
39 'folke/trouble.nvim',
40})
2 41
42--------------------------------------------------------------------------------
43-- vim options, first sourced from vimrc, then appended by Neovim specific stuff
44--------------------------------------------------------------------------------
45local configdir = vim.fn.fnamemodify(vim.fn.expand("$MYVIMRC"), ":p:h")
46vim.cmd('source ' .. configdir .. '/vimrc')
47vim.cmd.colorscheme "base16-rebecca"
48-- vim.cmd.colorscheme "base16-katy"
49
50vim.opt.encoding = 'utf-8'
51vim.opt.number = true
52vim.opt.number = true
53vim.opt.shiftwidth = 2
54vim.opt.tabstop = 2
55vim.opt.softtabstop = 2
56vim.opt.inccommand = "nosplit" -- Neovim only: preview substitute and such things in real time
3vim.opt.termguicolors = true 57vim.opt.termguicolors = true
4vim.opt.exrc = true 58vim.opt.shadafile = configdir .. "/shada.file"
5vim.opt.foldmethod = 'syntax' 59
60-- Restore cursor position
61vim.api.nvim_create_autocmd({ "BufReadPost" }, {
62 callback = function() vim.cmd('silent! normal! g`"zv') end
63})
64
65vim.api.nvim_create_user_command(
66 'LspFix',
67 function()
68 vim.lsp.buf.code_action()
69 end, {}
70)
6 71
7if vim.fn.has("win32") then 72if vim.fn.has("win32") then
8 vim.opt.rtp:append(vim.fn.expand("$HOME\\scoop\\shims")) 73 vim.opt.rtp:append(vim.fn.expand("$HOME\\scoop\\shims"))
9end 74end
10 75
11vim.opt.runtimepath:remove("/usr/share/vim/vimfiles") 76vim.g.lsp_log_verbose = 1
12vim.keymap.set('n', '<F12>', ':Buffers<CR>') 77vim.g.lsp_log_file = configdir .. ('/vim-lsp.log')
13 78
79if vim.g.neovide then
80 vim.guifont = "monospace:h11:b"
81 vim.g.neovide_cursor_animation_length = 0.03
82 vim.g.neovide_cursor_trail_size = 0.8
83 vim.g.neovide_scroll_animation_length = 0.05
84 vim.g.neovide_transparency = 0.9
85 vim.g.neovide_cursor_animation_length=0
86 vim.g.neovide_cursor_vfx_mode = ""
87 vim.g.neovide_floating_blur_amount_x = 4.0
88 vim.g.neovide_floating_blur_amount_y = 4.0
89 vim.g.neovide_background_color = '#383a62'
90 vim.g.neovide_scale_factor = 1.0
91end
14 92
93--------------------------------------------------------------------------------
94-- plugin setup and options
95--------------------------------------------------------------------------------
96require'nvim-treesitter.configs'.setup {
97 -- A list of parser names, or "all" (the five listed parsers should always be installed)
98 ensure_installed = { "c", "lua", "vim", "vimdoc", "query" },
99 modules = {},
100 -- Install parsers synchronously (only applied to `ensure_installed`)
101 sync_install = false,
102 -- Automatically install missing parsers when entering buffer
103 -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
104 auto_install = true,
105 ignore_install = { "javascript" },
106 highlight = {
107 enable = true,
108 -- NOTE: these are the names of the parsers and not the filetype. (for example if you want to
109 -- disable highlighting for the `tex` filetype, you need to include `latex` in this list as this is
110 -- the name of the parser)
111 -- list of language that will be disabled
112 disable = function(_, buf)
113 local max_filesize = 100 * 1024 -- 100 KB
114 local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
115 if ok and stats and stats.size > max_filesize then
116 return true
117 end
118 end,
119 -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
120 -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
121 -- Using this option may slow down your editor, and you may see some duplicate highlights.
122 -- Instead of true it can also be a list of languages
123 additional_vim_regex_highlighting = false,
124 },
125}
15 126
16-- vim.o.shadafile = "/tmp/shada" 127-- vim.wo.foldtext = 'v:lua.vim.treesitter.foldtext()' -- not available yet in my installation
128vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
129vim.wo.foldlevel = 1
17 130
18-- only on Linux... 131require('telescope').load_extension('media_files')
19-- vim.o.shadafile = (os.getenv("XDG_CACHE_HOME") or
20-- os.getenv("HOME") .. "/.cache"
21-- ) .. "/vim.shada"
22-- vimscript: get(environ(), "XDG_CACHE_HOME", "~/.cache")."/vim.shada"
23-- require'man'
24 132
25require'colorizer'.setup() 133vim.lsp.set_log_level 'error'
134if vim.fn.has 'nvim-0.5.1' == 1 then
135 require('vim.lsp.log').set_format_func(vim.inspect)
136end
137require'nvim-web-devicons'.setup {
138 color_icons = true;
139 default = true;
140 strict = true;
141}
142require('colorizer').setup()
143require('gitsigns').setup()
144require('trouble').setup()
145require('neodev').setup()
26 146
27-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers.. 147local builtin = require('telescope.builtin')
28require('cmp_nvim_lsp').setup{} 148vim.keymap.set('n', '<leader>ff', builtin.find_files, {})
29local capabilities = require('cmp_nvim_lsp').default_capabilities() 149vim.keymap.set('n', '<leader>fg', builtin.live_grep, {})
150vim.keymap.set('n', '<leader>fb', builtin.buffers, {})
151vim.keymap.set('n', '<leader>fh', builtin.help_tags, {})
30 152
153vim.keymap.set({"i", "s"}, "<leader><Tab>", function() require('luasnip').jump(1) end, {silent = true})
154vim.keymap.set({"i", "s"}, "<leader><S-Tab>", function() require('luasnip').jump(-1) end, {silent = true})
31 155
32local cmp = require('cmp'); 156local cmp = require'cmp'
33cmp.setup({ 157cmp.setup({
34 snippet = { 158 snippet = {
35 -- REQUIRED - you must specify a snippet engine 159 -- REQUIRED - you must specify a snippet engine
36 expand = function(args) 160 expand = function(args)
37 vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. 161 require('luasnip').lsp_expand(args.body) -- For `luasnip` users.
38 -- require('luasnip').lsp_expand(args.body) -- For `luasnip` users. 162 -- vim.snippet.expand(args.body) -- For native neovim snippets (Neovim v0.10+)
39 -- require('snippy').expand_snippet(args.body) -- For `snippy` users.
40 -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users.
41 end, 163 end,
42 }, 164 },
43 window = { 165 window = {
@@ -47,34 +169,13 @@ cmp.setup({
47 mapping = cmp.mapping.preset.insert({ 169 mapping = cmp.mapping.preset.insert({
48 ['<C-b>'] = cmp.mapping.scroll_docs(-4), 170 ['<C-b>'] = cmp.mapping.scroll_docs(-4),
49 ['<C-f>'] = cmp.mapping.scroll_docs(4), 171 ['<C-f>'] = cmp.mapping.scroll_docs(4),
50 ["<Tab>"] = cmp.mapping.select_next_item({behavior=cmp.SelectBehavior.Insert}),
51 ["<S-Tab>"] = cmp.mapping.select_prev_item({behavior=cmp.SelectBehavior.Insert}),
52 ['<C-Space>'] = cmp.mapping.complete(), 172 ['<C-Space>'] = cmp.mapping.complete(),
53 ['<C-e>'] = cmp.mapping.abort(), 173 ['<C-e>'] = cmp.mapping.abort(),
54 -- ['<CR>'] = cmp.mapping.confirm({ select = false }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. 174 ['<CR>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
55
56 ["<CR>"] = cmp.mapping.confirm({
57 behavior = cmp.ConfirmBehavior.Replace,
58 select = true,
59 }),
60
61 ['<C-s>'] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
62 }), 175 }),
63 sources = cmp.config.sources({ 176 sources = cmp.config.sources({
64 { name = 'nvim_lsp' }, 177 { name = 'nvim_lsp' },
65 { name = 'vsnip' }, -- For vsnip users. 178 { name = 'luasnip' }, -- For luasnip users.
66 -- { name = 'luasnip' }, -- For luasnip users.
67 -- { name = 'ultisnips' }, -- For ultisnips users.
68 -- { name = 'snippy' }, -- For snippy users.
69 }, {
70 { name = 'buffer' },
71 })
72})
73
74-- Set configuration for specific filetype.
75cmp.setup.filetype('gitcommit', {
76 sources = cmp.config.sources({
77 { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it.
78 }, { 179 }, {
79 { name = 'buffer' }, 180 { name = 'buffer' },
80 }) 181 })
@@ -82,75 +183,88 @@ cmp.setup.filetype('gitcommit', {
82 183
83-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). 184-- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore).
84cmp.setup.cmdline({ '/', '?' }, { 185cmp.setup.cmdline({ '/', '?' }, {
85 -- mapping = cmp.mapping.preset.cmdline(), 186 mapping = cmp.mapping.preset.cmdline({
86 sources = { 187 ['<Down>'] = { c = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }) },
87 { name = 'buffer' } 188 ['<Up>'] = { c = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }) },
88 } 189 }),
190 sources = {{ name = 'buffer' }}
89}) 191})
90 192
91-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). 193-- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore).
92cmp.setup.cmdline(':', { 194cmp.setup.cmdline(':', {
93 -- mapping = cmp.mapping.preset.cmdline(), 195 mapping = cmp.mapping.preset.cmdline({
94 sources = cmp.config.sources({ 196 ['<Down>'] = { c = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }) },
95 { name = 'cmdline' } 197 ['<Up>'] = { c = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }) },
96 }) 198 }),
199 sources = cmp.config.sources(
200 {{ name = 'path' }},
201 {{ name = 'cmdline' }}
202 ),
203 matching = {
204 disallow_symbol_nonprefix_matching = false,
205 disallow_partial_matching = false,
206 disallow_fullfuzzy_matching = false,
207 disallow_fuzzy_matching = false,
208 disallow_partial_fuzzy_matching = false,
209 disallow_prefix_unmatching = false,
210 }
97}) 211})
98 212
213-- Set up lspconfig.
214local capabilities = require('cmp_nvim_lsp').default_capabilities()
99 215
100-- # Language Servers 216-- # Language Servers
101-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md 217-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
102 218
103-- The following example advertise capabilities to `clangd`.
104-- C/C++ | clang 219-- C/C++ | clang
105require('lspconfig')['clangd'].setup{capabilities = capabilities} 220require('lspconfig')['clangd'].setup{capabilities = capabilities}
106 221-- lua (but not init.lua entirely, hence why neodev)
222require('lspconfig')['lua_ls'].setup { capabilities = capabilities }
223-- 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 }
224require'lspconfig'.jdtls.setup{}
107-- bash | bash-language-server 225-- bash | bash-language-server
108require('lspconfig')['bashls'].setup{capabilities = capabilities} 226require('lspconfig')['bashls'].setup{capabilities = capabilities}
109
110-- ccs | vscode-css-languageserver 227-- ccs | vscode-css-languageserver
111require('lspconfig')['cssls'].setup{capabilities = capabilities} 228require('lspconfig')['cssls'].setup{capabilities = capabilities}
112
113-- rust | rust-analyzer 229-- rust | rust-analyzer
114require('lspconfig')['rust_analyzer'].setup{capabilities = capabilities} 230require('lspconfig')['rust_analyzer'].setup{capabilities = capabilities}
115
116-- javascript | eslint 231-- javascript | eslint
117require('lspconfig')['eslint'].setup{capabilities = capabilities} 232require('lspconfig')['eslint'].setup{capabilities = capabilities}
118
119-- javascript | typescript-language-server 233-- javascript | typescript-language-server
120require('lspconfig')['tsserver'].setup{capabilities = capabilities} 234require('lspconfig')['tsserver'].setup{capabilities = capabilities}
121
122-- vimscript | vim-language-server 235-- vimscript | vim-language-server
123require('lspconfig')['vimls'].setup{capabilities = capabilities} 236require('lspconfig')['vimls'].setup{capabilities = capabilities}
124 237-- html
125require('lspconfig')['html'].setup{capabilities = capabilities} 238require('lspconfig')['html'].setup{capabilities = capabilities}
126 239-- jsonls
127require('lspconfig')['jsonls'].setup{capabilities = capabilities} 240require('lspconfig')['jsonls'].setup{capabilities = capabilities}
128
129-- C/C++ | clang 241-- C/C++ | clang
130require('lspconfig')['clangd'].setup{capabilities = capabilities} 242require('lspconfig')['clangd'].setup{capabilities = capabilities}
131
132-- bash | bash-language-server 243-- bash | bash-language-server
133require('lspconfig')['bashls'].setup{capabilities = capabilities} 244require('lspconfig')['bashls'].setup{capabilities = capabilities}
134
135-- ccs | vscode-css-languageserver 245-- ccs | vscode-css-languageserver
136require('lspconfig')['cssls'].setup{capabilities = capabilities} 246require('lspconfig')['cssls'].setup{capabilities = capabilities}
137
138-- rust | rust-analyzer 247-- rust | rust-analyzer
139require('lspconfig')['rust_analyzer'].setup{capabilities = capabilities} 248require('lspconfig')['rust_analyzer'].setup{capabilities = capabilities}
140
141-- javascript | eslint 249-- javascript | eslint
142require('lspconfig')['eslint'].setup{capabilities = capabilities} 250require('lspconfig')['eslint'].setup{capabilities = capabilities}
143
144-- javascript | typescript-language-server 251-- javascript | typescript-language-server
145require('lspconfig')['tsserver'].setup{capabilities = capabilities} 252require('lspconfig')['tsserver'].setup{capabilities = capabilities}
146
147-- vimscript | vim-language-server 253-- vimscript | vim-language-server
148require('lspconfig')['vimls'].setup{capabilities = capabilities} 254require('lspconfig')['vimls'].setup{capabilities = capabilities}
149 255-- configure html server
150require('lspconfig')['html'].setup{capabilities = capabilities} 256require('lspconfig')["html"].setup({
151 257 capabilities = capabilities,
152require('lspconfig')['jsonls'].setup{capabilities = capabilities} 258 -- on_attach = on_attach,
153 259 init_options = {
260 configurationSection = { "html", "css", "javascript" },
261 embeddedLanguages = {
262 css = true,
263 javascript = true,
264 },
265 provideFormatter = true,
266 },
267})
154require('lspconfig')['pylsp'].setup{ 268require('lspconfig')['pylsp'].setup{
155 settings = { 269 settings = {
156 pylsp = { 270 pylsp = {
@@ -164,50 +278,4 @@ require('lspconfig')['pylsp'].setup{
164 } 278 }
165} 279}
166 280
167-- lua
168require('lspconfig')['lua_ls'].setup{
169 settings = {
170 Lua = {
171 diagnostics = {
172 globals = { 'vim', 'require', 'cmp' }
173 }
174 }
175 }
176}
177
178
179require'nvim-treesitter.configs'.setup {
180 -- A list of parser names, or "all"
181 ensure_installed = { "c", "bash", "javascript" },
182
183 -- Install parsers synchronously (only applied to `ensure_installed`)
184 sync_install = false,
185
186 -- Automatically install missing parsers when entering buffer
187 -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally
188 auto_install = true,
189
190 -- List of parsers to ignore installing (for "all")
191 ignore_install = { "javascript" },
192
193 ---- If you need to change the installation directory of the parsers (see -> Advanced Setup)
194 -- parser_install_dir = "/some/path/to/store/parsers", -- Remember to run vim.opt.runtimepath:append("/some/path/to/store/parsers")!
195
196 highlight = {
197 -- `false` will disable the whole extension
198 enable = true,
199
200 -- Setting this to true will run `:h syntax` and tree-sitter at the same time.
201 -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation).
202 -- Using this option may slow down your editor, and you may see some duplicate highlights.
203 -- Instead of true it can also be a list of languages
204 additional_vim_regex_highlighting = false,
205 },
206}
207
208-- vim.wo.foldtext = 'v:lua.vim.treesitter.foldtext()' -- not available yet in my installation
209vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
210vim.wo.foldlevel = 1
211
212
213-- vim: tabstop=2 shiftwidth=2 softtabstop=2 281-- vim: tabstop=2 shiftwidth=2 softtabstop=2
diff --git a/pack/all/start/fzf b/pack/all/start/fzf
deleted file mode 160000
Subproject 70c461c60bb1e2165a378e8ba0451b511c29b5c
diff --git a/pack/all/start/fzf.vim b/pack/all/start/fzf.vim
deleted file mode 160000
Subproject d1016dbd7cec2d2a3bb5863776c84b4034e4b85
diff --git a/pack/all/start/vim-colorscheme-papercolor b/pack/all/start/vim-colorscheme-papercolor
deleted file mode 160000
Subproject 9051480ad9129ff4ab4fffb38b44779b9081626
diff --git a/pack/all/start/vim-editorconfig b/pack/all/start/vim-editorconfig
deleted file mode 160000
Subproject e014708e917b457e8f6c57f357d55dd3826880d
diff --git a/pack/all/start/vim-fancy-line b/pack/all/start/vim-fancy-line
deleted file mode 160000
Subproject 6bef9966d5f15203c1567516a5da49b72121423
diff --git a/pack/all/start/vim-karlmarks b/pack/all/start/vim-karlmarks
deleted file mode 160000
Subproject 9747ae42e4201b0991152d45a604b81c01d3e81
diff --git a/pack/all/start/vim-mercenary b/pack/all/start/vim-mercenary
deleted file mode 160000
Subproject 7e57581a60aec3bbc6499b4f49b3eca3b71caed
diff --git a/pack/all/start/vim-recently-used b/pack/all/start/vim-recently-used
deleted file mode 160000
Subproject 7845fa4e392e8808693096329bf3638e3231186
diff --git a/pack/all/start/vim-under-the-cursor b/pack/all/start/vim-under-the-cursor
deleted file mode 160000
Subproject f8a3dfbdf3b0b9d0eb18423115744f42660750f
diff --git a/pack/nvim/start/nvim-cmp b/pack/nvim/start/nvim-cmp
deleted file mode 160000
Subproject d3a3056204e1a9dbb7c7fe36c114dc43b681768
diff --git a/pack/nvim/start/nvim-cmp-buffer b/pack/nvim/start/nvim-cmp-buffer
deleted file mode 160000
Subproject 3022dbc9166796b644a841a02de8dd1cc1d311f
diff --git a/pack/nvim/start/nvim-cmp-lsp-signature-help b/pack/nvim/start/nvim-cmp-lsp-signature-help
deleted file mode 160000
Subproject 3d8912ebeb56e5ae08ef0906e3a54de1c66b92f
diff --git a/pack/nvim/start/nvim-cmp-nvim-lsp b/pack/nvim/start/nvim-cmp-nvim-lsp
deleted file mode 160000
Subproject 44b16d11215dce86f253ce0c30949813c0a9076
diff --git a/pack/nvim/start/nvim-colorizer b/pack/nvim/start/nvim-colorizer
deleted file mode 160000
Subproject 36c610a9717cc9ec426a07c8e6bf3b3abcb139d
diff --git a/pack/nvim/start/nvim-lsp b/pack/nvim/start/nvim-lsp
deleted file mode 160000
Subproject c58edb98f09a650612adaaf8c47995c9e2b7ffb
diff --git a/pack/nvim/start/nvim-lspconfig b/pack/nvim/start/nvim-lspconfig
deleted file mode 160000
Subproject 38da5bbe1eaab2394056109e48c7e195bdb8fdf
diff --git a/pack/nvim/start/nvim-lua-language-server b/pack/nvim/start/nvim-lua-language-server
deleted file mode 160000
Subproject ce964793afc6251673238c256a25e06502e487b
diff --git a/pack/nvim/start/nvim-plenary b/pack/nvim/start/nvim-plenary
deleted file mode 160000
Subproject 50012918b2fc8357b87cff2a7f7f0446e47da17
diff --git a/pack/nvim/start/nvim-telescope b/pack/nvim/start/nvim-telescope
deleted file mode 160000
Subproject 74ce793a60759e3db0d265174f137fb62743035
diff --git a/pack/nvim/start/nvim-treesitter b/pack/nvim/start/nvim-treesitter
deleted file mode 160000
Subproject 4a68f0778c05083cc458a3a144205cfc4147443
diff --git a/pack/nvim/start/nvim-vsnip b/pack/nvim/start/nvim-vsnip
deleted file mode 160000
Subproject be277461265f1e5c7db470aa479f30956597ea9
diff --git a/pack/vim/opt/vim-youcompleteme b/pack/vim/opt/vim-youcompleteme
deleted file mode 160000
Subproject cc9a3ae3efdcc7d038aab0620ea28882533c236
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 @@
1command! 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 @@
1"=======================================================================================================================
2" SHELL:
3" Many scripts rely on bash. We help to find the bash binary
4"=======================================================================================================================
5if filereadable("/bin/bash")
6 set shell=/bin/bash
7elseif filereadable("/usr/local/bin/bash")
8 set shell=/usr/local/bin/bash
9elseif has("win32")
10 set shell="cmd.exe"
11endif
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 @@
1"=======================================================================================================================
2" COLOR SCHEME:
3"=======================================================================================================================
4function! ExtendColorTheme()
5 highlight! Bold cterm=bold gui=bold
6 highlight! Italic cterm=italic gui=italic
7 highlight! Underline cterm=underline gui=underline
8 highlight! BoldUnderline cterm=bold,underline gui=bold,underline
9 highlight! BoldItalic cterm=bold,Italic gui=bold,italic
10 highlight! Todo cterm=bold gui=bold guibg=#ffffaa guifg=#000000
11 highlight! Error cterm=NONE ctermbg=NONE gui=NONE guibg=NONE
12 highlight! SpellBad cterm=NONE gui=undercurl guibg=NONE guifg=red
13 highlight! Ignore cterm=NONE ctermbg=NONE ctermfg=NONE gui=NONE guibg=NONE guifg=NONE
14 highlight! LineNr cterm=italic gui=italic
15 highlight! PmenuThumb cterm=inverse
16 highlight! MoreMsg cterm=inverse
17
18 highlight! link qfSeparator Normal | " reserve one space
19 highlight! link qfLineNr Normal | " informational line numbers should look different
20 highlight! link SpecialKey NonText | " makes tab stop (see listchars) less disturbing
21 highlight! link WildMenu Search
22 highlight! link Convention Error
23 highlight! link PmenuSbar Pmenu
24 highlight! link VertSplit LineNr
25 highlight! link SignColumn LineNr
26 highlight! link ALEErrorSign LineNr
27 highlight! link FoldColumn VertSplit
28 highlight! link Folded LineNr
29 highlight! link EndOfBuffer NonText
30 highlight! link DiagnosticHint Debug
31 highlight! link DiagnosticInfo Debug
32 highlight! link DiagnosticError Error
33 highlight! link DiagnosticWarn Debug
34
35
36 hi Comment gui=italic
37 hi Keyword gui=bold
38
39 autocmd BufReadPost * syntax match Convention /\s*$/
40endfunction
41autocmd ColorScheme * call ExtendColorTheme()
42
43if &term == "linux"
44 set notermguicolors
45else
46 set termguicolors
47endif
48
49
50let g:PaperColor_Theme_Options = {
51 \ 'theme': {
52 \ 'default.dark': {
53 \ 'transparent_background': 1
54 \ },
55 \ 'default.light': {
56 \ 'transparent_background': 1
57 \ }
58 \ }
59 \ }
60
61set background=dark
62colorscheme 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 @@
1
2
3augroup SET_WINDOW_TITLE
4 set title
5 set titlelen=40
6
7 " set window title for screen(3)
8 " if &term == "screen" || &term == "xterm"
9 if &term == "screen"
10 set t_ts=k
11 set t_fs=\
12 endif
13
14 " autocmd BufEnter * let &titlestring = hostname() . "[vim(" . expand("%:t") . ")]"
15 " autocmd CursorHold * let &titlestring = "%t %y ".$USER."@".hostname().":%{expand("%:~:.:h")}"
16 set titlestring=\ %F
17 " Fix terminal title =================================================================================================
18 " autocmd VimEnter * let &t_EI .= "\<Esc>[0 q"
19 " autocmd VimEnter * let &t_SI = "\<Esc>]12;green\x7"
20 autocmd VimLeave * silent !echo -ne "\033]112\007"
21augroup END
22
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 @@
1augroup NETRW
2 " Deprecated with this configuration, but still useful when deactivating some Plugins
3 " NETRW: obsolete with NERDTree
4 let g:netrw_alto = 0 | " open files on the right
5 let g:netrw_altv = 1 | " open files on the right
6 let g:netrw_banner = 0 | " display help messages?
7 let g:netrw_browse_split = 4 | " 4=open in previous window
8 let g:netrw_fastbrowse = 2 | " manually refresh direcory list (avoids display errors)
9 let g:netrw_hide = 1 | " show not-hidden files only
10 let g:netrw_keepdir = 1 | " because that works better, when gf finds a path name
11 let g:netrw_list_hide = '^\..*' | " Explore mode: hide files starting with dot
12 let g:netrw_liststyle = 3 | " 3=tree
13 let g:netrw_preview = 0 | "
14 let g:netrw_winsize = 20 | " window size in percent
15 " let s:treedepthstring = "│ " | " this is not going to work, but left here for documentation
16augroup 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 @@
1if &diff " only for diff mode/vimdiff
2 set diffopt=filler,context:1000000 " filler is default and inserts empty lines for sync
3 set foldmethod=syntax
4endif
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 @@
1augroup YOUCOMPLETEME
2 let g:ycm_error_symbol = '✖' " insert this as an error symbol in the gutter bar/sign column
3 let g:ycm_warning_symbol = '➔' " insert this as a warning symbol in the gutter bar/sign coloumn
4
5 let g:ycm_autoclose_preview_window_after_insertion = 0
6 let g:ycm_auto_trigger = 1
7 let g:ycm_collect_identifiers_from_tags_files = 0 " Let YCM read tags from Ctags file
8 let g:ycm_confirm_extra_conf = 0 " security is overrated ;)
9 let g:ycm_always_populate_location_list = 0 " we can manually run :YcmDiags to do that
10
11 let g:ycm_key_list_previous_completion = ['Up']
12 let g:ycm_key_list_select_completion = ['Down']
13
14 "" let g:ycm_semantic_triggers =
15 "" \ {
16 "" \ 'c': [ 're!\w{2}' ]
17 "" \ } " per language configurations
18 " packadd YouCompleteMe
19augroup END
20
21
diff --git a/utils/Xresources b/utils/Xresources
deleted file mode 100644
index 08969ac..0000000
--- a/utils/Xresources
+++ /dev/null
@@ -1,192 +0,0 @@
1#include "/home/max/.local/share/base16/base16-xresources/xresources/base16-tomorrow-night.Xresources"
2! #include "/home/max/.local/share/base16/base16-xresources/xresources/base16-tomorrow.Xresources"
3
4urxvt.scrollBar: false
5urxvt.background: base00
6urxvt.color0: base00
7urxvt.color1: base00
8urxvt.color2: base00
9urxvt.color3: base00
10urxvt.color4: base00
11urxvt.color5: base00
12urxvt.color6: base00
13urxvt.color7: base00
14urxvt.color8: base00
15urxvt.color9: base00
16
17! *Dialog.foreground: foreground
18! *Dialog.background: base00
19! *Dialog.Button.foreground: base05
20! *Dialog.Button.background: base00
21! !*Dialog.Button.pointBackground: #EAEAEA
22! !*Dialog.Button.clickBackground: #C3C3C3
23! *Dialog.text.foreground: base02
24! *Dialog.text.background: base00
25! *Dialog.topShadowColor: base03
26! *Dialog.bottomShadowColor: base04
27
28xscreensaver.logFile:/home/max/xscreensaver.log
29xscreensaver.verbose:true
30*.newLoginCommand: xset dpms force off
31
32Xft.antialias: true
33Xft.lcdfilter: lcddefault
34Xft.hinting: true
35Xft.rgba: rgb
36Xft.hintstyle: hintfull
37Xft.dpi: 96
38
39!*passwd.passwdFont: *-helvetica-medium-r-*-*-*-140-*-*-*-iso8859-1
40!*passwd.passwdFont:
41
42!*font: -*-clean-medium-r-*--12-*-*-*-*-*-*-*
43!*font: xft:Bitstream Vera Sans Mono-8
44!*font: *-dejavu sans-bold-r-*-*-*-*-*-*-*-*-*-*
45!*font: *-monospace-bold-r-*-*-*-*-*-*-*-*-*-*
46!*.font: xft:monaco:bold:size=8
47!*.font: xft:RobotoMono Nerd Font:bold:size=10
48*.passwdFont: xft:monospace
49*.font: xft:monospace
50
51
52xscreensaver.overlayTextForeground: #FFFF00
53xscreensaver.overlayTextBackground: #000000
54
55
56*passwd.thermometer.foreground: #FF0000
57*passwd.thermometer.background: #FFFFFF
58
59*passwd.heading.label: XScreenSaver %s
60*passwd.body.label: This screen is fucked.
61*passwd.unlock.label: unfuck
62*passwd.login.label: dpms: off
63*passwd.user.label: User:
64*passwd.thermometer.width: 12
65*passwd.asterisks: True
66*passwd.uname: False
67
68
69XLock*mode: image
70*image.bitmap: /home/max/.lock.xpm
71*image.count: 1
72*image.erasedelay: 0
73XLock*erasedelay: 0
74XLock*icongeometry: 180x180
75! XLock*background: background
76! XLock*foreground: foreground
77XLock*description: off
78XLock*info:
79
80
81
82
83! ---=== Experiment with making Motif less ugly for DDD ===---
84! (DDD ignores generically-set Motif properties so we must do this)
85! TODO (if possible):
86! - Hide text cursors in unfocused fields
87! - Convert on-hover effect from shadow to background color or border
88! - Pick better fonts and check which package provides them
89
90! Use the lighter background grey from the Lubuntu GTK+ theme
91! (Still a cool grey. Eyedropper the Clearlooks warm grey if necessary.)
92Ddd*background: #e0e0e0
93
94! These had no effect on my system but, from what I read, they help on
95! some systems.
96Ddd*enableThinThickness: True
97Ddd*enableEtchedInMenu: True
98Ddd*enableToggleColor: True
99Ddd*enableToggleVisual: True
100
101! Use pure white for white backgrounds like modern widget themes and websites
102Ddd*XmText.background: #ffffff
103Ddd*XmTextField.background: #ffffff
104Ddd*XmList.background: #ffffff
105Ddd*GraphEdit.background: #ffffff
106
107! Thick borders and shadows everywhere are archaic
108Ddd*shadowThickness: 1
109Ddd*borderThickness: 0
110Ddd*?*arg*shadowThickness: 1
111Ddd*?*arg*borderThickness: 0
112Ddd*?*buttons*shadowThickness: 1
113Ddd*?*buttons*borderThickness: 0
114
115! Un-cramp the menubar, menus, and toolbar to match modern compact sizing
116Ddd*menubar*marginTop: 1
117Ddd*menubar*marginBottom: 0
118Ddd*XmMenuShell*marginTop: 2
119Ddd*XmMenuShell*marginBottom: 2
120Ddd*XmMenuShell.?.marginWidth: 2
121Ddd*XmMenuShell.?.marginHeight: 2
122Ddd*toolbar*marginWidth: 5
123
124! Compact the menu tear-off buttons
125Ddd*XmMenuShell*XmTearOffButton*borderWidth: 0
126Ddd*XmMenuShell*XmTearOffButton*marginHeight: 0
127
128! DDD's interpretation of a "toggle button" shouldn't have a raised border
129Ddd*XmToggleButton*shadowThickness: 0
130Ddd*XmToggleButton*borderThickness: 0
131
132! The menu bar should not have a raised border
133Ddd*menubar.shadowThickness: 0
134Ddd*menubar.borderThickness: 0
135Ddd*XmMenuShell*XmTearOffButton*ShadowThickness: 2
136
137! ...and we do not want a border around the toolbar to make that stand out
138Ddd*main_window.?.borderThickness: 0
139Ddd*main_window.shadowThickness: 0
140
141! Drop-down boxes in toolbars do not have raised borders these days
142Ddd*toolbar.shadowThickness: 0
143Ddd*toolbar.?.shadowThickness: 1
144
145! DDD can sometimes get its GDB settings fatally messed up so duplicate
146! GUI-exposed integration defaults here for when I want to nuke ~/.ddd/init
147Ddd*cutCopyPasteBindings: KDE
148Ddd*selectAllBindings: KDE
149Ddd*buttonColorKey: c
150Ddd*FlatButtons: on
151
152
153! Good Xaw3d Defaults*customization: -color
154*shadowWidth: 3
155*Form.background: gray75
156*MenuButton.background: gray75
157*SimpleMenu.background: gray70
158*TransientShell*Dialog.background: gray70
159*Command.background: gray75
160*Label.background: gray75
161*ScrollbarBackground: grey39
162*Scrollbar*background: gray75
163*Scrollbar*width: 15
164*Scrollbar*height: 15
165*Scrollbar*shadowWidth: 2
166*Scrollbar*cursorName: top_left_arrow
167*Scrollbar*pushThumb: false
168*shapeStyle: Rectangle
169*beNiceToColormap: False
170*SmeBSB*shadowWidth: 3
171*highlightThickness: 0
172*topShadowContrast: 40
173*bottomShadowContrast: 60
174! fix up a few of the default X clients who
175! now look silly
176*xclock*shadowWidth: 0
177*xload*shadowWidth: 0
178*xcalc*shadowWidth: 0
179
180
181XTerm.vt100.faceName: Monospace:antialias=true
182XTerm.vt100.faceSize: 12
183! XTerm.vt100.font: 7x14
184XTerm.vt100.locale: true
185XTerm.vt100.utf8Title: true
186
187
188! keepassx colourscheme
189keepassx*background: #cfcfcf
190keepassx*foreground: #222222
191keepassx2*background: #cfcfcf
192keepassx2*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 @@
1[Desktop Entry]
2Type=Application
3Name=Gnome Vi IMproved Buffer
4Icon=gvim
5Comment=Open file in an existing instance of vi and in a new tab
6MimeType=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++;
7Exec=gvim -f -N --remote-silent %F
8Terminal=false
9X-XClassHintResName=VIM
10Categories=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 @@
1[Desktop Entry]
2Name=Vi IMproved Tab
3Comment=Open file in an existing instance of vi and in a new tab
4MimeType=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++;
5Exec=gvim f -N --remote-tab %F
6Icon=gvim
7Type=Application
8Terminal=false
9X-XClassHintResName=VIM
10Categories=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 @@
1[Desktop Entry]
2Version=1.0
3Type=Application
4Name=Vim
5Comment=
6Exec=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
7Icon=/usr/share/icons/HighContrast/256x256/apps/vim.png
8Path=
9Terminal=false
10StartupNotify=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 @@
1[Desktop Entry]
2Version=1.0
3Type=Application
4Name=Vi IMproved
5Comment=Open file in an existing instance of vi and in a new tab
6Icon=gvim
7MimeType=text/*
8Categories=Application;Utility;TextEditor;
9Exec=vim %F
10Terminal=true
11Actions=Server;
12
13[Desktop Action Server]
14Exec=vim --servername VIM --remote-silent %F
15Name=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 @@
1
2# gvim () { /bin/gvim $(if [[ "$#" > 0 && `/bin/gvim --serverlist | wc -l` ]]; then echo --remote; fi) $@; }
3# vim () { /bin/vim $(if [[ "$#" > 0 && `/bin/vim --serverlist | wc -l` ]]; then echo --remote; fi) $@; }
4
5# man()
6# {
7# /bin/gvim \
8# $(if [[ `/bin/gvim --serverlist | wc -l` > 0 ]]; then echo --remote-send; fi) \
9# ":enew<CR>:0read !groffer --pager='cat' --tty $1 <bar> col -bx<CR> :set filetype=man buftype=nowrite readonly<CR>gg";
10# }
11
12# export MANPAGER='vim -c":set noswapfile|%!col -b" -c":file man|:setlocal filetype=man buftype=nowrite readonly nonumber nolist signcolumn=no" -'
13export MANPAGER="vim -M +MANPAGER -"
14
15# man() { /bin/vim ":enew<CR>:0read !groffer --pager='cat' --tty $1 <bar> col -bx<CR> :set filetype=man buftype=nowrite readonly<CR>gg" -; }
16# alias git='git -c color.ui=false'
17# export GIT_DIFF_OPTS="--no-color"
18
19
20
21git config --global --replace-all color.pager 0
22git config --global --replace-all core.pager 'vim -c":set noswapfile filetype=git buftype=nowrite readonly nolist nonumber signcolumn=no|:file git" -'
23# export GIT_PAGER=''
24
25# alias git="TERM=dumb git"
26
27# export EDITOR="gvim()"
28# export PAGER="tee /tmp/output.txt /dev/stdout | /bin/vim -"
29
30# --remote-expr ":%!col -b" -c":set buftype=nowrite filetype=man readonly" -'A
31
32function vim() {
33 SERVER=$(ls -tr "$XDG_RUNTIME_DIR"/nvim.* | tail -n1)
34 if [ $# -gt 0 ] && [ -n "$SERVER" ]; then
35 for i in "$@"; do
36 NEXT=$(realpath "$i")
37 nvim --server "$SERVER" --remote-silent "$NEXT"
38 done
39 else
40 nvim $@
41 fi
42
43}
44
45
46
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 @@
1<?xml version="1.0"?>
2<!-- this is a configuration file for fontconfig and should be copied or linked to ~/.config/fontconfig/fonts.conf -->
3<!DOCTYPE fontconfig SYSTEM "/etc/fonts/fonts.dtd">
4<fontconfig>
5 <match target="pattern">
6 <test name="family"><string>monospace</string></test>
7 <edit name="family" mode="prepend">
8 <!--<string>Iosevka Term SS04</string>-->
9 <string>FuraCode Nerd Font Mono Medium</string>
10 <string>FiraCode Nerd Font</string>
11 <string>FuraCode Nerd Font</string>
12 <string>Noto Color Emoji</string>
13 </edit>
14 <edit name="fontfeatures" mode="append">
15 <string>liga on</string>
16 <string>dlig on</string>
17 </edit>
18 <test name="slant" compare="not_eq"><const>italic</const></test>
19 <edit mode="assign" name="style"><string>bold</string></edit>
20 </match>
21 <!-- Block Symbola from the list of fallback fonts. -->
22 <selectfont>
23 <rejectfont>
24 <pattern>
25 <patelt name="family">
26 <string>Symbola</string>
27 </patelt>
28 </pattern>
29 </rejectfont>
30 </selectfont>
31 <match target="pattern">
32 <test name="family"><string>serif</string></test>
33 <edit name="family" mode="prepend">
34 <string>Noto Serif</string>
35 </edit>
36 </match>
37 <match target="pattern">
38 <test name="family"><string>sans-serif</string></test>
39 <edit name="family" mode="prepend">
40 <string>Noto Sans</string>
41 </edit>
42 </match>
43 <match target="pattern">
44 <edit name="dpi" mode="assign"><double>102</double></edit>
45 </match>
46
47 <match target="pattern">
48 <test name="family">
49 <string>Tahoma</string>
50 </test>
51 <edit name="family" mode="assign">
52 <string>Sans-Serif</string>
53 </edit>
54 </match>
55</fontconfig>
56 <!--
57 family: "Anonymous Pro for Powerline"(s)
58 family: "Consolas for Powerline"(s) "Consolas for Powerline FixedD"(s)
59 family: "DejaVu Sans Mono for Powerline"(s)
60 family: "Droid Sans Mono for Powerline"(s)
61 family: "Inconsolata for Powerline"(s)
62 family: "Inconsolata-dz for Powerline"(s)
63 family: "Liberation Mono for Powerline"(s)
64 family: "Menlo for Powerline"(s)
65 family: "Meslo LG L DZ for Powerline"(s)
66 family: "Meslo LG L for Powerline"(s)
67 family: "Meslo LG M DZ for Powerline"(s)
68 family: "Meslo LG M for Powerline"(s)
69 family: "Meslo LG S DZ for Powerline"(s)
70 family: "Meslo LG S for Powerline"(s)
71 family: "PowerlineSymbols"(s)
72 family: "Source Code Pro for Powerline"(s)
73 family: "Source Code Pro for Powerline"(s) "Source Code Pro Black"(s)
74 family: "Source Code Pro for Powerline"(s) "Source Code Pro ExtraLight"(s)
75 family: "Source Code Pro for Powerline"(s) "Source Code Pro Light"(s)
76 family: "Source Code Pro for Powerline"(s) "Source Code Pro Medium"(s)
77 family: "Source Code Pro for Powerline"(s) "Source Code Pro Semibold"(s)
78 family: "Terminus for Powerline"(s)
79 family: "Ubuntu Mono derivative Powerline"(s)
80 family: "xos4 Terminess Powerline"(s)
81 family: "xos4 Terminus for Powerline"(s)
82 -->
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 @@
1<?xml version="1.0"?>
2<!-- this is a configuration file for fontconfig and should be copied or linked to ~/.config/fontconfig/conf.d/ -->
3<!DOCTYPE fontconfig SYSTEM "/etc/fonts/fonts.dtd">
4<fontconfig>
5 <match target="pattern">
6 <test qual="any" name="family"><string>serif</string></test>
7 <edit name="family" mode="assign" binding="same"><string>Noto Serif</string></edit>
8 </match>
9 <match target="pattern">
10 <test qual="any" name="family"><string>sans-serif</string></test>
11 <edit name="family" mode="assign" binding="same"><string>Noto Sans</string></edit>
12 </match>
13 <match target="pattern">
14 <test qual="any" name="family"><string>monospace</string></test>
15 <edit mode="assign" name="family"><string>Hack</string></edit>
16 <edit mode="prepend" name="family"><string>Noto Color Emoji</string></edit>
17 <edit mode="prepend" name="family"><string>emoji</string></edit>
18
19 <test name="slant" compare="not_eq"><const>italic</const></test>
20 <edit mode="assign" name="style"><string>bold</string></edit>
21 </match>
22</fontconfig>
23 <!--
24 family: "Anonymous Pro for Powerline"(s)
25 family: "Consolas for Powerline"(s) "Consolas for Powerline FixedD"(s)
26 family: "DejaVu Sans Mono for Powerline"(s)
27 family: "Droid Sans Mono for Powerline"(s)
28 family: "Inconsolata for Powerline"(s)
29 family: "Inconsolata-dz for Powerline"(s)
30 family: "Liberation Mono for Powerline"(s)
31 family: "Menlo for Powerline"(s)
32 family: "Meslo LG L DZ for Powerline"(s)
33 family: "Meslo LG L for Powerline"(s)
34 family: "Meslo LG M DZ for Powerline"(s)
35 family: "Meslo LG M for Powerline"(s)
36 family: "Meslo LG S DZ for Powerline"(s)
37 family: "Meslo LG S for Powerline"(s)
38 family: "PowerlineSymbols"(s)
39 family: "Source Code Pro for Powerline"(s)
40 family: "Source Code Pro for Powerline"(s) "Source Code Pro Black"(s)
41 family: "Source Code Pro for Powerline"(s) "Source Code Pro ExtraLight"(s)
42 family: "Source Code Pro for Powerline"(s) "Source Code Pro Light"(s)
43 family: "Source Code Pro for Powerline"(s) "Source Code Pro Medium"(s)
44 family: "Source Code Pro for Powerline"(s) "Source Code Pro Semibold"(s)
45 family: "Terminus for Powerline"(s)
46 family: "Ubuntu Mono derivative Powerline"(s)
47 family: "xos4 Terminess Powerline"(s)
48 family: "xos4 Terminus for Powerline"(s)
49 -->
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 @@
1/* name or link this file ~/.config/gtk-3.0/gtk.css */
2
3/*
4#vim-menubar,
5#vim-menubar #menu,
6#vim-toolbar,
7#vim-gui-drawarea,
8#vim-main-window {
9 color:#6060af;
10 color: #4e4e4e;
11 font-family: "Hasklug Nerd Font Mono", "Source Code Pro for Powerline", "Source Code Pro", "Roboto";
12 font-weight:bold;
13 font-size:8pt;
14 border:0;
15 outline:0;
16}
17
18* {
19 border-width:0px;
20 outline-width:0px;
21 padding:0;
22 margin:0;
23}
24
25#vim-menubar
26{
27 padding-left:1em;
28 border-bottom:2px solid #ffffff;
29}
30
31#vim-menubar>*
32{
33 padding-right:1em;
34 padding-top:.25em;
35 padding-bottom:.25em;
36}
37
38#vim-menubar>*,
39#vim-main-window {
40 background-color:#ffffff;
41 color: #4e4e4e;
42}
43
44menu menuitem:backdrop, menu menuitem:backdrop:hover
45{
46 border:0px;
47}
48*/
49
50
51
52window#vim-main-window > box
53{
54 background: currentColor;
55 border:2px solid transparent;
56}
57
58/* within window > box ... */
59menubar#vim-menubar {
60 font-family: "monospace";
61 font-size:8pt;
62 background: transparent;
63 color:lighter(currentColor);
64 /* background: linear-gradient(180deg, white 85%, black); */
65}
66
67menubar#vim-menubar menuitem {
68 background:transparent;
69 color:mix(currentColor,#fff,0.5);
70}
71
72
73
74menubar#vim-menubar > menuitem {
75 padding:.25em;
76}
77
78menubar#vim-menubar > menuitem:disabled accelerator
79{
80 color:#f00;
81}
82
83menubar#vim-menubar menuitem box {
84 padding:.1em .25em;
85}
86
87menubar#vim-menubar menuitem window
88{
89 margin-top:1em;
90}
91
92/* opened menu (after being clicked) */
93menubar#vim-menubar menuitem window menu {
94 background:lighter(currentColor);
95 padding:0;
96 margin:0;
97 border:0;
98}
99
100menubar#vim-menubar menuitem window menu menuitem {
101 padding:0em;
102 margin:0px;
103 border:0px;
104}
105
106menubar#vim-menubar menuitem window menu menuitem box {
107 padding:.25em;
108 padding-left:.5em;
109}
110
111menubar#vim-menubar menuitem window menu separator {
112 margin:0;
113 background:currentColor;
114 border-top:1px dotted #666;
115}
116
117
118menubar#vim-menubar menuitem:hover {
119 box-shadow:none;
120 background:darker(currentColor);
121 color:#fff;
122}
123
124
125
126
127
128
129/*
130toolbar button {
131notebook tab {
132*/
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 @@
1gtk-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 @@
1LANG=de_DE.utf8
2LC_CTYPE=de_DE.utf8
3LC_NUMERIC=de_DE.utf8
4LC_TIME=de_DE.utf8
5LC_COLLATE=C
6LC_MONETARY=de_DE.utf8
7LC_MESSAGES=de_DE.utf8
8LC_PAPER=de_DE.utf8
9LC_NAME=de_DE.utf8
10LC_ADDRESS=de_DE.utf8
11LC_TELEPHONE=de_DE.utf8
12LC_MEASUREMENT=de_DE.utf8
13LC_IDENTIFICATION=de_DE.utf8
14LC_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 @@
1git 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 @@
1# im-config(8) generated on Tue, 28 Feb 2017 13:21:48 +0100
2run_im ibus
3# im-config signature: ec6901ebc5d2dcf71d14062c6968658e -
diff --git a/vimrc b/vimrc
index 424f5f0..f3b1833 100644
--- a/vimrc
+++ b/vimrc
@@ -1,33 +1,389 @@
1exec ':source '.fnamemodify($MYVIMRC,':h').'/'.'vimrc-common' 1"=======================================================================================================================
2set packpath+=pack/submodules 2" GENERAL
3"=======================================================================================================================
3 4
4if has("nvim") 5filetype on
5 set shadafile="/tmp/shada" 6filetype plugin on
7filetype indent on
8
9syntax on | " enable syntax highlighting
10syntax sync minlines=60 | " how many preceding lines will be parsed? (high performance impact)
11
12set secure | " to ensure, that modelines do not contain executable code
13set noexrc | " exrc was nice, but has too many security problems. Now using editorconfig instead (see plugins)
14set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig)
15set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against
16set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis
17set 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)
18set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good)
19
20
21"=======================================================================================================================
22" BASIC CODE STYLE
23"=======================================================================================================================
24" set cindent cinoptions+=(0 | " indents at the level of parentheses -- if desired
25set expandtab | " replace tabs with spaces
26set textwidth=0 | " should be set file type specific, colorcolumns is there to assist anyways
27set tabstop=4
28set shiftwidth=4
29set softtabstop=4
30
31"=======================================================================================================================
32" PATH -- where to search for includes (e.g. `gf` or `:find`)
33"=======================================================================================================================
34set path+=**4 | " allow recursive searches for files (limit depth by 4)
35if executable("uname") " does not work under Windows
36 let &path = &path.",/usr/lib/modules/".substitute(system('uname -r'), "\n", "", "")."/build/include"
37endif
38
39if filereadable("/bin/bash")
40 set shell=/bin/bash
41elseif filereadable("/usr/local/bin/bash")
42 set shell=/usr/local/bin/bash
43elseif has("win32")
44 set shell="cmd.exe"
45endif
46
47" ======================================================================================================================
48" SETTINGS:
49" ======================================================================================================================
50set breakindent | " Every wrapped line will continue visually indented
51set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
52set concealcursor=nc | " limits the display of concealed text to normal and command mode
53set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX)
54set confirm | " asks 'do you want to save?'
55set cpoptions+=P | " makes :w filename set the current buffer to filename
56set hidden | " allows switching buffers even if the current buffer contains changes (displays +)
57set linebreak | " wrap long lines at char 'breakat', not inside words
58set mousemodel=popup | " only in gvim: right click opens a pop-up-menu
59set mouse=n | " allow mouse in normal mode only, so one can use the terminals c&p feature in insert mode
60set noautochdir | " When on, Vim will change the current working directory
61set nostartofline | " when scrolling: do not move the cursor to column 1
62set nowrap | " but do not (by default) wrap long lines around
63set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers
64
65set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for
66set scrolljump=4 | " how many lines get scrolled into view when cursor reaches the screens edge
67set scrolloff=4 | " keeps cursor centered
68set shiftround | " indent/un-indent snaps to multiple of shiftwidths
69set writedelay=0
70
71" display and performance
72set lazyredraw | " disables redraw during macro execution (improves performance, but causes problems with solid backgrounds)
73set cmdheight=2 | " sets the command line's height
74set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators
75set nocursorcolumn | " turn visual cursor column off (improves performance)
76set updatetime=80 | " updates the screen more often
77set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry
78set notimeout | " improves performance but is known to cause problems on slow terminals
79set ttimeout ttimeoutlen=150 | " set Esc key timeout in ms-
80set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering)
81set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always
82set shortmess+=I | " don't give the intro message when starting Vim |:intro|.
83set wildmenu | " use a menu in the command line
84set wildmode=longest:full | " do not preselect any entry and show all possible
85
86" code completion
87" set dictionary=/usr/share/dict/cracklib-small
88set isfname-== | " remove = as char in filenames, because most FSs do not support it
89set complete+=d | " scan current and included files for defined name or macro
90set complete+=i | " scan current and included files for completions
91set complete+=k | " make default completer <C-N> respect the dictionary
92set complete-=u | " scan current and included files
93set complete+=i | " scan current and included files
94set complete+=d | " scan current and included files for defined name or macro
95" set complete=d | " scan current and included files for defined name or macro
96set completeopt+=noinsert | " Do not insert any text for a match until the user selects one
97set completeopt+=noselect | " Do not select a completion from the menu, let the user do that
98set tagcase=match | " tagcase match, because we mostly use ^] to jump around and that variant respects the upper/lower case [followscs, followic, match, ignore]
99set tags+=../tags
100
101" code folding...
102set nofoldenable | " disable folding, because we have zi to toggle foldenable :)
103set foldclose=all | " automatically fold, when the cursor leaves the folded area
104set foldcolumn=0 | " I think I don't need this second indicator
105" set numberwidth=5
106" set foldmethod=syntax | " foldlevel: syntax, indent, manual / foldmethod=syntax makes Vim incredible slow
107set foldnestmax=1 | " top level folding only
108set foldopen=block,hor,search | " when do we unfold?
109" set foldtext=printf('%*s%.*S',indent(v:foldstart),'',&textwidth-indent(v:foldstart),substitute(substitute(join(getline(v:foldstart,v:foldend),'\ '),'[[:space:]*/]\\+','\ ','g'),'^[[:space:]*]','','g'))
110set foldtext=repeat('\ ',indent(v:foldstart)-1).join(getline(v:foldstart,v:foldend))[:winwidth(0)]->substitute('[[:space:]]\\+','\ ','g')
111
112" works ...
113" set foldexpr=match(synIDattr(synID(v:lnum,indent(v:lnum)+1,0),'name'),'Comment')>-1
114set foldexpr=!empty(filter(synstack(v:lnum,indent(v:lnum)+1),{_,val->match(synIDattr(val,'name'),'Comment')>-1}))
115
116" vim window behaviour
117set splitbelow | " open new windows below the current one (i find that more intuitive)
118set splitright | " this also works for me and makes better use of the scren space I think
119set winminwidth=0 | " (and all other windows, so TODO: watch out)
120set winwidth=30 | " keep NERDTreeWindow at least this size
121
122" vim session handling and restore behaviour
123set viminfo+=% | " restore buffer list
124set sessionoptions=
125set sessionoptions+=buffers
126set sessionoptions+=curdir
127set sessionoptions+=folds
128set sessionoptions+=resize
129set sessionoptions+=slash
130set sessionoptions+=tabpages
131set sessionoptions+=unix
132set sessionoptions+=winpos
133set sessionoptions+=winsize
134
135" set nocindent smartindent | " use smart indent rather then cindent
136set noautoindent
137set nosmartindent
138
139set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths
140set noequalalways | " do not evenly size windows when opening new or closing old
141set nocursorline | " turn visual cursor line off (improves performance)
142
143"=======================================================================================================================
144" SPELL_CHECKING:
145"=======================================================================================================================
146let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
147" add local user default spell file as primary source for words
148let &spellfile=fnamemodify($MYVIMRC, ":p:h")."/spell/spellfile-user.UTF-8.add"
149
150set nospell | " disable spell checker by default
151set spelllang=en,de | " languages for the spell checker
152set spellsuggest=10 | " how many words will z= suggest?
153set thesaurus+=~/.vim/thesaurus/php.txt
154
155if &diff " only for diff mode/vimdiff
156 set diffopt=filler,context:1000000 " filler is default and inserts empty lines for sync
157 set foldmethod=syntax
158endif
159
160"=======================================================================================================================
161" UNDO:
162" Persistent undo behaviour, also keeps undo history between starts
163"=======================================================================================================================
164if has('persistent_undo')
165 if isdirectory('/dev/shm')
166 set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undoes
167 set directory=/dev/shm/ | " swap file directory to RAM
168 set swapfile
169 elseif isdirectory('/tmp/')
170 set undodir=/tmp/
171 endif
172 set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistence)
6endif 173endif
7 174
8if exists("g:neovide") 175
9 " neovide specific 176"=======================================================================================================================
10 set guifont=monospace:h11:b 177" DISPLAY & MULTI_BYTE
11 " :#e-subpixelantialias:#h-full 178"=======================================================================================================================
12 let g:neovide_cursor_animation_length=0.03 179if has("multi_byte")
13 let g:neovide_cursor_trail_size=0.8 180 scriptencoding utf-8 | " tell vim that we are using UTF-8 here
14 let g:neovide_scroll_animation_length = 0.05 181 set encoding=utf-8 | " we need default UTF-8 encoding to use cool chars as line break and so on (see below)
15 let g:neovide_transparency = 0.9 182 set termencoding=utf-8 | " we just assume that this is supported.
183
184 set fillchars= | " initialize empty fillchars
185 set listchars= | " initialize empty listchars
186
187 if &term ==# 'linux'
188 set fillchars+=vert:\│ | " cool vertical split char
189 else
190 set fillchars+=vert:\║ | " cool vertical split char
191 endif
192
193 set fillchars+=fold:\ | "
194 set fillchars+=diff:\ | " a white space gets used here
195
196 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars)
197 set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars)
198
199 set listchars+=tab:▏\ | "
200 set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars)
201 " set listchars+=eol:↲ | " symbols used when using :set list (which displays non-printable chars)
202 " set listchars+=space:⸳ | " · | " symbols used when using :set list (which displays non-printable chars)
203 set showbreak+=› | " symbol used in the beginning of a wrapped line
204
205 " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective)
206 set nolist
207
208 autocmd InsertEnter * set list
209 autocmd InsertLeave * set list&
210
211 autocmd InsertEnter * set colorcolumn=80,120
212 autocmd InsertLeave * set colorcolumn&
213 " set fillchars+=stlnc:\― | "
214end
215
216
217"=======================================================================================================================
218" AUTOCMDs and FileType specific stuff
219"=======================================================================================================================
220if has("autocmd")
221 " use the shada/viminfo file to return the cursor to where it was...
222 autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif
223
224 " Workaround: Allows Vim to yank text within wayland
225 " XDG_SESSION_TYPE is only set if a login manager was used
226 " WAYLAND_DISPLAY should always work
227 " if ($XDG_SESSION_TYPE ==# 'wayland' || ! empty($WAYLAND_DISPLAY)) && !has('nvim')
228 " autocmd TextYankPost * call system("wl-copy", getreg('+'))
229 " endif
230
231 autocmd TextYankPost * echo '> text yanked to '.
232 \ (get(v:event,'regname') == ''
233 \ ? 'default register'
234 \ : 'register '.get(v:event,'regname'))
235
236
237 autocmd InsertLeave * silent! call matchadd('Convention', ' \+$', -1, 101, { 'conceal': '⟶' })
238 autocmd InsertEnter * silent! call matchdelete(101)
239
240
241 "====================================================================================================================
242 augroup FILETYPES
243 " indent within <script> and <style> (default is a zero indent)
244 let g:html_indent_script1 = "inc"
245 let g:html_indent_style1 = "inc"
246
247 " let g:loaded_ruby_provider = 1 " disable ruby support
248 " let g:loaded_python_provider = 1 " disable python 3
249
250 let g:LatexBox_latexmk_preview_continuously = 1
251 let g:LatexBox_viewer = "evince"
252
253 autocmd FileType python setlocal keywordprg=pydoc
254 autocmd FileType vim setlocal keywordprg=:help |.
255 autocmd FileType conf setlocal isfname-==
256 autocmd Filetype css command! CSSsort :g/{/+1;/}/-1 sort
257 autocmd Filetype html,markdown,xml iabbrev </ </<C-X><C-O>
258
259 autocmd Filetype html,htmldjango,xml
260 \ :nnoremap
261 \ <M-Down>
262 \ :call search('^ *<', 'e')<CR>:nohlsearch<CR>|
263 \ :nnoremap
264 \ <M-Up>
265 \ :call search('^ *<', 'eb')<CR>:nohlsearch<CR>|
266 \ :nnoremap
267 \ <leader>=
268 \ vat:'<,'>!tidy -xml --wrap 0 --sort-attributes alpha 2>/dev/null<CR>vat=
269 augroup END
16endif 270endif
17 271
18" if ($XDG_SESSION_TYPE ==# 'wayland' || ! empty($WAYLAND_DISPLAY)) 272" ======================================================================================================================
19" autocmd TextYankPost * call system("wl-copy", get(v:event, 'regcontents')) 273augroup CUSTOM_COMMANDS
20" nnoremap p :silent put =system('wl-paste')<CR> 274 command! Qfls call setqflist([],'r',{ 'title':'listed buffers', 'items':map(getbufinfo({"buflisted":1}), '{"bufnr":get(v:val,"bufnr"),"lnum":get(v:val,"lnum"),"module":printf("%-*s",winwidth(0)-4,fnamemodify(get(v:val,"name"),":t"))}') })
21" nnoremap P :silent put! =system('wl-paste')<CR> 275 command! Ctoggle
22" endif 276 \ if(get(getqflist({'winid':1}), 'winid') == win_getid())|cclose|else|botright copen|endif
23 277 command! Ltoggle
24" scripts from the default vim installation, which do not get loaded by default, but are useful. 278 \ if(get(getloclist(0, {'winid':1}), 'winid') == win_getid())|lclose|else|lopen|endif
25" if filereadable($VIMRUNTIME.'/macros/editexisting.vim') 279 command! BuffersToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))'))
26" packadd! editexisting 280 command! BufToArg :argadd %:.
27" endif 281 command! Gbranch call setqflist([], 'r', {'title':'Git branch selector','items':map(systemlist("git branch"), {_, p->{'filename':'branch','module': fnamemodify(p, ':.')}})})
28" 282 " the following command opens a preview-window and shows the declaration of
29" " load default plugin 'matchit' to allow % to jump between tags 283 " the function under the cursor. It also highlights the word to make it easier
30" if filereadable($VIMRUNTIME.'/macros/matchit.vim') 284 " to spot within a great file
31" packadd! matchit 285 command! Helpme au! CursorHold * nested let @/=expand('<cword>')|exe "silent! psearch ".expand("<cword>")
32" endif 286 command! FindInAllBuffers cex [] | bufdo vimgrepadd //g % | cw
33" 287augroup END
288
289"=======================================================================================================================
290augroup KEYBOARD_MAPPING
291 " map CTRL-PageUp/Down to next/previous buffer
292 " and Shift-PageUp/Down to next/previous arglist file
293 nnoremap <C-PageUp> :bn<CR>
294 nnoremap <C-PageDown> :bp<CR>
295 nnoremap <S-PageUp> :N<CR>
296 nnoremap <S-PageDown> :n<CR>
297
298 nnoremap <F4> :wincmd c<CR>
299 nnoremap <F5> :make!<CR>
300 nnoremap <F6> :silent syntax sync fromstart<CR>:nohlsearch<CR>:silent match<CR>:silent 2match<CR>:silent 3match<CR>
301 nnoremap <F7> :Ltoggle<CR>
302 nnoremap <F8> :Ctoggle<CR>
303 nnoremap <F9> :TagbarToggle<CR>
304 "" remap <..>
305 nnoremap <F12> :Qfls<CR>:Ctoggle<CR>
306
307 " close current buffer with <leader>q...
308 nnoremap <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>.
309 nnoremap <leader>r :syntax sync fromstart
310
311 nnoremap <silent> <A-Up> :wincmd k<CR>
312 nnoremap <silent> <A-Down> :wincmd j<CR>
313 nnoremap <silent> <A-Left> :wincmd h<CR>
314 nnoremap <silent> <A-Right> :wincmd l<CR>
315
316
317 inoremap <C-S> <C-O>:w<CR>
318
319 " exec current line as a command, insert output of command (from: https://youtu.be/MquaityA1SM?t=35m45s)
320 nnoremap <leader>Q !!$SHELL<CR>
321 " google the word under the cursor
322 nnoremap <leader>g :execute ":!xdg-open https://google.de/search?q=".expand("<cword>")<CR>
323 nnoremap <leader>u :execute ":!xdg-open ".expand("<cWORD>")<CR>
324 " display highlight group under the cursor
325 nnoremap <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR>
326
327
328 " ======================================================================================================================
329 " SHORTCUTS: custom shortcuts
330 " inoremap <C-Space> <C-x><C-o>
331 " inoremap <C-@> <C-Space>
332
333 " Bind CTRL+Backspace to vim's version (CTRL+W) in " <CR> insert mode (only works with gvim)
334 inoremap <C-Backspace> <C-W>
335
336 " INDENTATION: allows un-indenting a selected block and keeps selection
337 vnoremap < <gv
338 vnoremap > >gv
339
340 " make shift-home select to the beginning of the line
341 nnoremap <s-home> v^
342 nnoremap <s-end> v$
343
344 nnoremap <s-down> vj
345 vnoremap <s-down> j
346 nnoremap <s-up> vk
347 vnoremap <s-up> k
348
349 " if the wildmenu is configured to to display suggestions vertically, then
350 " reconfigure the cursor keys to work in that direction
351 if &wildoptions =~# 'pum'
352 cnoremap <expr> <up> pumvisible() ? "<C-p>" : "\<up>"
353 cnoremap <expr> <down> pumvisible() ? "<C-n>" : "\<down>"
354 endif
355
356
357 " INSERT_MODE_MAPPINGS:
358 " default copy&paste insert key binding (just in insert mode, so it doesn't conflict
359 " with visual block mode)- would have been nice, but collides with c-w for digraphs
360 " inoremap <C-V> <C-R>+
361
362 " NEOVIM_SPECIFIC:
363 if has('nvim') " only neovim...
364 " shortcut \t opens a terminal in a horizontal split
365 nnoremap <leader>t :new +terminal<CR>
366 endif
367augroup END
368
369augroup NETRW
370 " Deprecated with this configuration, but still useful when deactivating some Plugins
371 " NETRW: obsolete with NERDTree
372 let g:netrw_alto = 0 | " open files on the right
373 let g:netrw_altv = 1 | " open files on the right
374 let g:netrw_banner = 0 | " display help messages?
375 let g:netrw_browse_split = 4 | " 4=open in previous window
376 let g:netrw_fastbrowse = 2 | " manually refresh direcory list (avoids display errors)
377 let g:netrw_hide = 1 | " show not-hidden files only
378 let g:netrw_keepdir = 1 | " because that works better, when gf finds a path name
379 let g:netrw_list_hide = '^\..*' | " Explore mode: hide files starting with dot
380 let g:netrw_liststyle = 3 | " 3=tree
381 let g:netrw_preview = 0 | "
382 let g:netrw_winsize = 20 | " window size in percent
383 " let s:treedepthstring = "│ " | " this is not going to work, but left here for documentation
384augroup END
385
386
387"=======================================================================================================================
388" v modeline, do not chnage v
389" vim: noai:ts=2:sw=2:sts=2 iskeyword+=\:,\<,\>,\-,\& number
diff --git a/vimrc-common b/vimrc-common
deleted file mode 100644
index dc48045..0000000
--- a/vimrc-common
+++ /dev/null
@@ -1,379 +0,0 @@
1"=======================================================================================================================
2" GENERAL
3"=======================================================================================================================
4
5filetype on
6filetype plugin on
7filetype indent on
8
9syntax on | " enable syntax highlighting
10syntax sync minlines=60 | " how many preceding lines will be parsed? (high performance impact)
11
12set secure | " to ensure, that modelines do not contain executable code
13set noexrc | " exrc was nice, but has too many security problems. Now using editorconfig instead (see plugins)
14set modeline | " set variables specific to a file, like indentation by adding a comment (TODO: should probably be replaced by editorconfig)
15set virtualedit=all | " virtual edit should be default behaviour, because I don't see any reason against
16set nonumber norelativenumber | " do not show numbers by default, because that causes a performance loss, instead activate them on a file type basis
17set 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)
18set hlsearch incsearch | " highlight pattern while entering it (performance wise this isn't that good)
19
20
21"=======================================================================================================================
22" BASIC CODE STYLE
23"=======================================================================================================================
24" set cindent cinoptions+=(0 | " indents at the level of parentheses -- if desired
25set expandtab | " replace tabs with spaces
26set textwidth=0 | " should be set file type specific, colorcolumns is there to assist anyways
27set tabstop=4
28set shiftwidth=4
29set softtabstop=4
30
31
32" ======================================================================================================================
33" SETTINGS:
34" ======================================================================================================================
35set breakindent | " Every wrapped line will continue visually indented
36set clipboard=unnamedplus | " makes copy and paste work (autoselectplus might work as well)
37set concealcursor=nc | " limits the display of concealed text to normal and command mode
38set conceallevel=2 | " replace escaped chars by their UTF-8 representation (useful for LaTeX)
39set confirm | " asks 'do you want to save?'
40set cpoptions+=P | " makes :w filename set the current buffer to filename
41set hidden | " allows switching buffers even if the current buffer contains changes (displays +)
42set linebreak | " wrap long lines at char 'breakat', not inside words
43set mousemodel=popup | " only in gvim: right click opens a pop-up-menu
44set mouse=n | " allow mouse in normal mode only, so one can use the terminals c&p feature in insert mode
45set noautochdir | " When on, Vim will change the current working directory
46set nostartofline | " when scrolling: do not move the cursor to column 1
47set nowrap | " but do not (by default) wrap long lines around
48set nrformats+=alpha | " allows CTRL-A & CTRL-X to increment and decrement letters, not just numbers
49
50if has('nvim') " Neovim?
51 set inccommand=nosplit | " preview substitute and such things in real time
52endif
53
54if exists("g:neovide")
55 set guifont=monospace:h11:b
56 let g:neovide_cursor_animation_length=0
57 let g:neovide_scroll_animation_length = 0.5
58 let g:neovide_cursor_trail_size=0.8
59 let g:neovide_cursor_vfx_mode = ""
60 let g:neovide_transparency = 0.9
61 let g:neovide_floating_blur_amount_x = 4.0
62 let g:neovide_floating_blur_amount_y = 4.0
63 let g:neovide_background_color = '#383a62'
64 let g:neovide_scale_factor = 1.0
65endif
66
67set pumheight=8 | " Determines the maximum number of items to show in the pop-up menu for
68set scrolljump=4 | " how many lines get scrolled into view when cursor reaches the screens edge
69set scrolloff=4 | " keeps cursor centered
70set shiftround | " indent/un-indent snaps to multiple of shiftwidths
71set writedelay=0
72
73" display and performance
74set lazyredraw | " disables redraw during macro execution (improves performance, but causes problems with solid backgrounds)
75set cmdheight=2 | " sets the command line's height
76set signcolumn=yes | " auto=auto hide, yes=always, no=never show the column with error indicators
77set nocursorcolumn | " turn visual cursor column off (improves performance)
78set updatetime=80 | " updates the screen more often
79set redrawtime=1500 | " Timeout in milliseconds for redrawing the screen (switches syntax off when ssh too slow) / CTRL+L to retry
80set notimeout | " improves performance but is known to cause problems on slow terminals
81set ttimeout ttimeoutlen=150 | " set Esc key timeout in ms-
82set showcmd | " essential: show keys of combined commands in the lower right corner (BUT SLOW, makes cursor flickering)
83set showtabline=2 | " 0: never, 1: only if there are at least two tabs, 2:always
84set shortmess+=I | " don't give the intro message when starting Vim |:intro|.
85set wildmenu | " use a menu in the command line
86set wildmode=longest:full | " do not preselect any entry and show all possible
87
88" code completion
89" set dictionary=/usr/share/dict/cracklib-small
90set isfname-== | " remove = as char in filenames, because most FSs do not support it
91set complete+=d | " scan current and included files for defined name or macro
92set complete+=i | " scan current and included files for completions
93set complete+=k | " make default completer <C-N> respect the dictionary
94set complete-=u | " scan current and included files
95set complete+=i | " scan current and included files
96set complete+=d | " scan current and included files for defined name or macro
97" set complete=d | " scan current and included files for defined name or macro
98set completeopt+=noinsert | " Do not insert any text for a match until the user selects one
99set completeopt+=noselect | " Do not select a completion from the menu, let the user do that
100set tagcase=match | " tagcase match, because we mostly use ^] to jump around and that variant respects the upper/lower case [followscs, followic, match, ignore]
101set tags+=../tags
102
103" code folding...
104set nofoldenable | " disable folding, because we have zi to toggle foldenable :)
105set foldclose=all | " automatically fold, when the cursor leaves the folded area
106set foldcolumn=0 | " I think I don't need this second indicator
107" set numberwidth=5
108" set foldmethod=syntax | " foldlevel: syntax, indent, manual / foldmethod=syntax makes Vim incredible slow
109set foldnestmax=1 | " top level folding only
110set foldopen=block,hor,search | " when do we unfold?
111" set foldtext=printf('%*s%.*S',indent(v:foldstart),'',&textwidth-indent(v:foldstart),substitute(substitute(join(getline(v:foldstart,v:foldend),'\ '),'[[:space:]*/]\\+','\ ','g'),'^[[:space:]*]','','g'))
112set foldtext=repeat('\ ',indent(v:foldstart)-1).join(getline(v:foldstart,v:foldend))[:winwidth(0)]->substitute('[[:space:]]\\+','\ ','g')
113
114" works ...
115" set foldexpr=match(synIDattr(synID(v:lnum,indent(v:lnum)+1,0),'name'),'Comment')>-1
116set foldexpr=!empty(filter(synstack(v:lnum,indent(v:lnum)+1),{_,val->match(synIDattr(val,'name'),'Comment')>-1}))
117
118" vim window behaviour
119set splitbelow | " open new windows below the current one (i find that more intuitive)
120set splitright | " this also works for me and makes better use of the scren space I think
121set winminwidth=0 | " (and all other windows, so TODO: watch out)
122set winwidth=30 | " keep NERDTreeWindow at least this size
123
124" vim session handling and restore behaviour
125set viminfo+=% | " restore buffer list
126set sessionoptions=
127set sessionoptions+=buffers
128set sessionoptions+=curdir
129set sessionoptions+=folds
130set sessionoptions+=resize
131set sessionoptions+=slash
132set sessionoptions+=tabpages
133set sessionoptions+=unix
134set sessionoptions+=winpos
135set sessionoptions+=winsize
136
137" set nocindent smartindent | " use smart indent rather then cindent
138set noautoindent
139set nosmartindent
140
141set noshiftround | " indent/un-indent sna=ps to multiple of shiftwidths
142set noequalalways | " do not evenly size windows when opening new or closing old
143set nocursorline | " turn visual cursor line off (improves performance)
144
145
146"=======================================================================================================================
147" PATH -- where to search for includes (e.g. `gf` or `:find`)
148"=======================================================================================================================
149set path+=**4 | " allow recursive searches for files (limit depth by 4)
150if executable("uname") " does not work under Windows
151 let &path = &path.",/usr/lib/modules/".substitute(system('uname -r'), "\n", "", "")."/build/include"
152endif
153
154
155"=======================================================================================================================
156" SPELL_CHECKING:
157"=======================================================================================================================
158let g:spellfile_URL = 'http://ftp.vim.org/vim/runtime/spell'
159" add local user default spell file as primary source for words
160let &spellfile=fnamemodify($MYVIMRC, ":p:h")."/spell/spellfile-user.UTF-8.add"
161
162set nospell | " disable spell checker by default
163set spelllang=en,de | " languages for the spell checker
164set spellsuggest=10 | " how many words will z= suggest?
165set thesaurus+=~/.vim/thesaurus/php.txt
166
167
168"=======================================================================================================================
169" UNDO:
170" Persistent undo behaviour, also keeps undo history between starts
171"=======================================================================================================================
172if has('persistent_undo')
173 if isdirectory('/dev/shm')
174 set undodir=/dev/shm/ | " save undo file in memory. That is volatile, but fast and we have GIT for longer lasting undoes
175 set directory=/dev/shm/ | " swap file directory to RAM
176 set swapfile
177 elseif isdirectory('/tmp/')
178 set undodir=/tmp/
179 endif
180 set undofile | " preserve undo history when closing and reopening buffers (see :help undo-persistence)
181endif
182
183
184"=======================================================================================================================
185" DISPLAY & MULTI_BYTE
186"=======================================================================================================================
187if has("multi_byte")
188 scriptencoding utf-8 | " tell vim that we are using UTF-8 here
189 set encoding=utf-8 | " we need default UTF-8 encoding to use cool chars as line break and so on (see below)
190 set termencoding=utf-8 | " we just assume that this is supported.
191
192 set fillchars= | " initialize empty fillchars
193 set listchars= | " initialize empty listchars
194
195 if &term ==# 'linux'
196 set fillchars+=vert:\│ | " cool vertical split char
197 else
198 set fillchars+=vert:\║ | " cool vertical split char
199 endif
200
201 set fillchars+=fold:\ | "
202 set fillchars+=diff:\ | " a white space gets used here
203
204 set listchars+=extends:» | " symbols used when using :set list (which displays non-printable chars)
205 set listchars+=precedes:« | " symbols used when using :set list (which displays non-printable chars)
206
207 set listchars+=tab:▏\ | "
208 set listchars+=trail:· | " symbols used when using :set list (which displays non-printable chars)
209 " set listchars+=eol:↲ | " symbols used when using :set list (which displays non-printable chars)
210 " set listchars+=space:⸳ | " · | " symbols used when using :set list (which displays non-printable chars)
211 set showbreak+=› | " symbol used in the beginning of a wrapped line
212
213 " automatically enter list mode when going in insert mode (makes above syntax command temporarily ineffective)
214 set nolist
215
216 autocmd InsertEnter * set list
217 autocmd InsertLeave * set list&
218
219 autocmd InsertEnter * set colorcolumn=80,120
220 autocmd InsertLeave * set colorcolumn&
221 " set fillchars+=stlnc:\― | "
222end
223
224
225"=======================================================================================================================
226" AUTOCMDs and FileType specific stuff
227"=======================================================================================================================
228if has("autocmd")
229 " use the shada/viminfo file to return the cursor to where it was...
230 autocmd BufWinEnter * if &previewwindow | setlocal nonumber nolist signcolumn=no filetype=c nobuflisted | endif
231
232 " Workaround: Allows Vim to yank text within wayland
233 " XDG_SESSION_TYPE is only set if a login manager was used
234 " WAYLAND_DISPLAY should always work
235 " if ($XDG_SESSION_TYPE ==# 'wayland' || ! empty($WAYLAND_DISPLAY)) && !has('nvim')
236 " autocmd TextYankPost * call system("wl-copy", getreg('+'))
237 " endif
238
239 autocmd TextYankPost * echo '> text yanked to '.
240 \ (get(v:event,'regname') == ''
241 \ ? 'default register'
242 \ : 'register '.get(v:event,'regname'))
243
244
245 autocmd InsertLeave * silent! call matchadd('Convention', ' \+$', -1, 101, { 'conceal': '⟶' })
246 autocmd InsertEnter * silent! call matchdelete(101)
247
248
249 "====================================================================================================================
250 augroup FILETYPES
251 " indent within <script> and <style> (default is a zero indent)
252 let g:html_indent_script1 = "inc"
253 let g:html_indent_style1 = "inc"
254
255 " let g:loaded_ruby_provider = 1 " disable ruby support
256 " let g:loaded_python_provider = 1 " disable python 3
257
258 let g:LatexBox_latexmk_preview_continuously = 1
259 let g:LatexBox_viewer = "evince"
260
261 autocmd FileType python setlocal keywordprg=pydoc
262 autocmd FileType vim setlocal keywordprg=:help |.
263 autocmd FileType conf setlocal isfname-==
264 autocmd Filetype css command! CSSsort :g/{/+1;/}/-1 sort
265 autocmd Filetype html,markdown,xml iabbrev </ </<C-X><C-O>
266
267 autocmd Filetype html,htmldjango,xml
268 \ :nnoremap
269 \ <M-Down>
270 \ :call search('^ *<', 'e')<CR>:nohlsearch<CR>|
271 \ :nnoremap
272 \ <M-Up>
273 \ :call search('^ *<', 'eb')<CR>:nohlsearch<CR>|
274 \ :nnoremap
275 \ <leader>=
276 \ vat:'<,'>!tidy -xml --wrap 0 --sort-attributes alpha 2>/dev/null<CR>vat=
277 augroup END
278endif
279
280" ======================================================================================================================
281augroup CUSTOM_COMMANDS
282 command! Qfls call setqflist([],'r',{ 'title':'listed buffers', 'items':map(getbufinfo({"buflisted":1}), '{"bufnr":get(v:val,"bufnr"),"lnum":get(v:val,"lnum"),"module":printf("%-*s",winwidth(0)-4,fnamemodify(get(v:val,"name"),":t"))}') })
283 command! Ctoggle
284 \ if(get(getqflist({'winid':1}), 'winid') == win_getid())|cclose|else|botright copen|endif
285 command! Ltoggle
286 \ if(get(getloclist(0, {'winid':1}), 'winid') == win_getid())|lclose|else|lopen|endif
287 command! BuffersToArg :exec ':args '.join(map(range(0, bufnr('$')), 'fnameescape(fnamemodify(bufname(v:val), ":."))'))
288 command! BufToArg :argadd %:.
289 command! Gbranch call setqflist([], 'r', {'title':'Git branch selector','items':map(systemlist("git branch"), {_, p->{'filename':'branch','module': fnamemodify(p, ':.')}})})
290 " the following command opens a preview-window and shows the declaration of
291 " the function under the cursor. It also highlights the word to make it easier
292 " to spot within a great file
293 command! Helpme au! CursorHold * nested let @/=expand('<cword>')|exe "silent! psearch ".expand("<cword>")
294 command! FindInAllBuffers cex [] | bufdo vimgrepadd //g % | cw
295augroup END
296
297"=======================================================================================================================
298augroup KEYBOARD_MAPPING
299 " map CTRL-PageUp/Down to next/previous buffer
300 " and Shift-PageUp/Down to next/previous arglist file
301 nnoremap <C-PageUp> :bn<CR>
302 nnoremap <C-PageDown> :bp<CR>
303 nnoremap <S-PageUp> :N<CR>
304 nnoremap <S-PageDown> :n<CR>
305
306 nnoremap <F4> :wincmd c<CR>
307 nnoremap <F5> :make!<CR>
308 nnoremap <F6> :silent syntax sync fromstart<CR>:nohlsearch<CR>:silent match<CR>:silent 2match<CR>:silent 3match<CR>
309 nnoremap <F7> :Ltoggle<CR>
310 nnoremap <F8> :Ctoggle<CR>
311 nnoremap <F9> :TagbarToggle<CR>
312 "" remap <..>
313 nnoremap <F12> :Qfls<CR>:Ctoggle<CR>
314
315 " close current buffer with <leader>q...
316 nnoremap <leader>q :bp<bar>sp<bar>bn<bar>bd<CR>.
317 nnoremap <leader>r :syntax sync fromstart
318
319 nnoremap <silent> <A-Up> :wincmd k<CR>
320 nnoremap <silent> <A-Down> :wincmd j<CR>
321 nnoremap <silent> <A-Left> :wincmd h<CR>
322 nnoremap <silent> <A-Right> :wincmd l<CR>
323
324
325 inoremap <C-S> <C-O>:w<CR>
326
327 " exec current line as a command, insert output of command (from: https://youtu.be/MquaityA1SM?t=35m45s)
328 nnoremap <leader>Q !!$SHELL<CR>
329 " google the word under the cursor
330 nnoremap <leader>g :execute ":!xdg-open https://google.de/search?q=".expand("<cword>")<CR>
331 nnoremap <leader>u :execute ":!xdg-open ".expand("<cWORD>")<CR>
332 " display highlight group under the cursor
333 nnoremap <leader>h :echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')<CR>
334
335
336 " ======================================================================================================================
337 " SHORTCUTS: custom shortcuts
338 " inoremap <C-Space> <C-x><C-o>
339 " inoremap <C-@> <C-Space>
340
341 " Bind CTRL+Backspace to vim's version (CTRL+W) in " <CR> insert mode (only works with gvim)
342 inoremap <C-Backspace> <C-W>
343
344 " INDENTATION: allows un-indenting a selected block and keeps selection
345 vnoremap < <gv
346 vnoremap > >gv
347
348 " make shift-home select to the beginning of the line
349 nnoremap <s-home> v^
350 nnoremap <s-end> v$
351
352 nnoremap <s-down> vj
353 vnoremap <s-down> j
354 nnoremap <s-up> vk
355 vnoremap <s-up> k
356
357 " if the wildmenu is configured to to display suggestions vertically, then
358 " reconfigure the cursor keys to work in that direction
359 if &wildoptions =~# 'pum'
360 cnoremap <expr> <up> pumvisible() ? "<C-p>" : "\<up>"
361 cnoremap <expr> <down> pumvisible() ? "<C-n>" : "\<down>"
362 endif
363
364
365 " INSERT_MODE_MAPPINGS:
366 " default copy&paste insert key binding (just in insert mode, so it doesn't conflict
367 " with visual block mode)- would have been nice, but collides with c-w for digraphs
368 " inoremap <C-V> <C-R>+
369
370 " NEOVIM_SPECIFIC:
371 if has('nvim') " only neovim...
372 " shortcut \t opens a terminal in a horizontal split
373 nnoremap <leader>t :new +terminal<CR>
374 endif
375augroup END
376
377"=======================================================================================================================
378" v modeline, do not chnage v
379" vim: noai:ts=2:sw=2:sts=2 iskeyword+=\:,\<,\>,\-,\& number
..