From f2e01d7e513067ddb57c75f6e38cdcf434946cf8 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Mon, 22 Oct 2018 00:02:58 +0200 Subject: Major refactoring for version 2.0 vim-plug has been removed and replaced with Vims internal bundle mechanism. But I already noticed, that there is also GLVM now and started trying that as well. --- .gitmodules | 57 ++ GetLatest/GetLatestVimScripts.dat | 10 + bashrc | 30 - compton.conf | 64 -- default-font.conf | 61 -- gtk-3.0.css | 117 --- gvim-buffer.desktop | 10 - gvim.desktop | 10 - gvimrc | 29 + init.vim | 36 +- list-commands.vim | 6 + nvim.desktop | 10 - plugin/AlignMapsPlugin.vim | 253 +++++ plugin/AlignPlugin.vim | 41 + plugin/cecutil.vim | 482 +++++++++ plugin/cscope.vim | 57 ++ plugin/jedi.vim | 15 + plugin/max-change-icon.vim | 11 + plugin/max-find-bash.vim | 9 + plugin/max-fix-colorschemes.vim | 49 + plugin/max-function-menu.vim | 173 ++++ plugin/max-highlight-word-under-cursor.vim | 18 + plugin/max-set-window-title.vim | 21 + plugin/max-splash.vim | 23 + plugin/nerdtree.vim | 25 + plugin/netrw.vim | 16 + plugin/signify.vim | 35 + plugin/snippets.vim | 12 + plugin/statusline.vim | 125 +++ plugin/tagbar.vim | 10 + plugin/terminal.vim | 19 + vim.desktop | 13 - vimpagerrc | 12 +- vimrc | 50 +- vimrc-common | 355 +++++++ vimrc-full | 1255 ------------------------ vimrc-minimal-statusline | 30 + xdg-additions/applications/gvim-buffer.desktop | 10 + xdg-additions/applications/gvim.desktop | 10 + xdg-additions/applications/nvim.desktop | 10 + xdg-additions/applications/vim.desktop | 13 + xdg-additions/bashrc | 30 + xdg-additions/default-font.conf | 61 ++ xdg-additions/gtk-3.0.css | 117 +++ ycm_extra_mini-conf.py | 138 +++ 45 files changed, 2360 insertions(+), 1578 deletions(-) create mode 100644 GetLatest/GetLatestVimScripts.dat delete mode 100644 bashrc delete mode 100644 compton.conf delete mode 100644 default-font.conf delete mode 100644 gtk-3.0.css delete mode 100644 gvim-buffer.desktop delete mode 100644 gvim.desktop create mode 100644 gvimrc mode change 120000 => 100644 init.vim create mode 100644 list-commands.vim delete mode 100644 nvim.desktop create mode 100644 plugin/AlignMapsPlugin.vim create mode 100644 plugin/AlignPlugin.vim create mode 100644 plugin/cecutil.vim create mode 100644 plugin/cscope.vim create mode 100644 plugin/jedi.vim create mode 100644 plugin/max-change-icon.vim create mode 100644 plugin/max-find-bash.vim create mode 100644 plugin/max-fix-colorschemes.vim create mode 100644 plugin/max-function-menu.vim create mode 100644 plugin/max-highlight-word-under-cursor.vim create mode 100644 plugin/max-set-window-title.vim create mode 100644 plugin/max-splash.vim create mode 100644 plugin/nerdtree.vim create mode 100644 plugin/netrw.vim create mode 100644 plugin/signify.vim create mode 100644 plugin/snippets.vim create mode 100644 plugin/statusline.vim create mode 100644 plugin/tagbar.vim create mode 100644 plugin/terminal.vim delete mode 100644 vim.desktop mode change 120000 => 100644 vimrc create mode 100644 vimrc-common delete mode 100644 vimrc-full create mode 100644 vimrc-minimal-statusline create mode 100644 xdg-additions/applications/gvim-buffer.desktop create mode 100644 xdg-additions/applications/gvim.desktop create mode 100644 xdg-additions/applications/nvim.desktop create mode 100644 xdg-additions/applications/vim.desktop create mode 100644 xdg-additions/bashrc create mode 100644 xdg-additions/default-font.conf create mode 100644 xdg-additions/gtk-3.0.css create mode 100644 ycm_extra_mini-conf.py diff --git a/.gitmodules b/.gitmodules index 605d959..a24b441 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,60 @@ [submodule "autoload"] path = autoload url = https://github.com/junegunn/vim-plug +[submodule "plugin/YouCompleteMe"] + path = pack/vim/opt/YouCompleteMe + url = https://github.com/Valloric/YouCompleteMe.git +[submodule "plugin/vim-remote-menu"] + path = pack/_all/start/vim-remote-menu + url = https://github.com/coderonline/vim-remote-menu.git +[submodule "plugin/base16-vim"] + path = pack/_all/start/base16-vim + url = https://github.com/chriskempson/base16-vim.git +[submodule "plugin/papercolor-theme"] + path = pack/_all/start/papercolor-theme + url = https://github.com/NLKNguyen/papercolor-theme.git +[submodule "plugin/vim-signify"] + path = pack/_all/opt/vim-signify + url = https://github.com/mhinz/vim-signify.git +[submodule "plugin/vim-fugitive"] + path = pack/_all/start/vim-fugitive + url = https://github.com/tpope/vim-fugitive.git +[submodule "plugin/tabular"] + path = pack/_all/start/tabular + url = https://github.com/godlygeek/tabular.git +[submodule "plugin/tagbar"] + path = pack/_all/opt/tagbar + url = https://github.com/majutsushi/tagbar.git +[submodule "plugin/vim-surround"] + path = pack/_all/start/vim-surround + url = https://github.com/tpope/vim-surround.git +[submodule "plugin/nerdtree"] + path = pack/_all/opt/nerdtree + url = https://github.com/scrooloose/nerdtree.git +[submodule "plugin/ultisnips"] + path = pack/_all/opt/ultisnips + url = https://github.com/SirVer/ultisnips.git +[submodule "plugin/vim-snippets"] + path = pack/_all/opt/vim-snippets + url = https://github.com/honza/vim-snippets.git +[submodule "plugin-neovim/deoplete.nvim"] + path = pack/neovim/start/deoplete.nvim + url = https://github.com/Shougo/deoplete.nvim.git +[submodule "plugin-neovim/echodoc.vim"] + path = pack/neovim/start/echodoc.vim + url = https://github.com/Shougo/echodoc.vim.git +[submodule "plugin-neovim/LanguageClient-neovim"] + path = pack/neovim/start/LanguageClient-neovim + url = https://github.com/autozimu/LanguageClient-neovim.git +[submodule "plugin-neovim/ale"] + path = pack/neovim/start/ale + url = https://github.com/w0rp/ale.git +[submodule "plugin-vim/syntastic"] + path = pack/vim/opt/syntastic + url = https://github.com/vim-syntastic/syntastic.git +[submodule "plugin/jedi-vim"] + path = pack/_all/opt/jedi-vim + url = https://github.com/davidhalter/jedi-vim.git +[submodule "plugin/vim-operator-user"] + path = pack/_all/start/vim-operator-user + url = https://github.com/kana/vim-operator-user.git diff --git a/GetLatest/GetLatestVimScripts.dat b/GetLatest/GetLatestVimScripts.dat new file mode 100644 index 0000000..aff0816 --- /dev/null +++ b/GetLatest/GetLatestVimScripts.dat @@ -0,0 +1,10 @@ +ScriptID SourceID Filename +-------------------------- +294 19633 :AutoInstall: Align.vim +120 9388 Decho.vim +40 21108 DrawIt.tar.gz +451 9231 EasyAccents.vim +195 6351 engspchk.vim +642 15781 GetLatestVimScripts.vim +489 16670 Manpageview.vim +1066 7618 :AutoInstall: cecutil.vim diff --git a/bashrc b/bashrc deleted file mode 100644 index 24c51a0..0000000 --- a/bashrc +++ /dev/null @@ -1,30 +0,0 @@ - -# gvim () { /bin/gvim $(if [[ "$#" > 0 && `/bin/gvim --serverlist | wc -l` ]]; then echo --remote; fi) $@; } -# vim () { /bin/vim $(if [[ "$#" > 0 && `/bin/vim --serverlist | wc -l` ]]; then echo --remote; fi) $@; } - -# man() -# { -# /bin/gvim \ -# $(if [[ `/bin/gvim --serverlist | wc -l` > 0 ]]; then echo --remote-send; fi) \ -# ":enew:0read !groffer --pager='cat' --tty $1 col -bx :set filetype=man buftype=nowrite readonlygg"; -# } - -# export MANPAGER='vim -c":set noswapfile|%!col -b" -c":file man|:setlocal filetype=man buftype=nowrite readonly nonumber nolist signcolumn=no" -' -export MANPAGER="vim -M +MANPAGER -" - -# man() { /bin/vim ":enew:0read !groffer --pager='cat' --tty $1 col -bx :set filetype=man buftype=nowrite readonlygg" -; } -# alias git='git -c color.ui=false' -# export GIT_DIFF_OPTS="--no-color" - - - -git config --global --replace-all color.pager 0 -git config --global --replace-all core.pager 'vim -c":set noswapfile filetype=git buftype=nowrite readonly nolist nonumber signcolumn=no|:file git" -' -# export GIT_PAGER='' - -# alias git="TERM=dumb git" - -# export EDITOR="gvim()" -# export PAGER="tee /tmp/output.txt /dev/stdout | /bin/vim -" - -# --remote-expr ":%!col -b" -c":set buftype=nowrite filetype=man readonly" -'A diff --git a/compton.conf b/compton.conf deleted file mode 100644 index 1d3025d..0000000 --- a/compton.conf +++ /dev/null @@ -1,64 +0,0 @@ -backend = "xrender"; -#backend = "glx"; -paint-on-overlay = true; -glx-no-stencil = true; -# glx-no-rebind-pixmap = true; # does not work! definitelly! -# vsync = "opengl-swc"; -vsync = "drm"; -# vsync-use-glfinish = true - -# These are important. The first one enables the opengl backend. The last one is the vsync method. Depending on the driver you might need to use a different method. -# The other options are smaller performance tweaks that work well in most cases. -# You can find the rest of the options here: https://github.com/chjj/compton/wiki/perf-guide, and here: https://github.com/chjj/compton/wiki/vsync-guide - - -# Shadow -#shadow = true; # Enabled client-side shadows on windows. -shadow = false; # Enabled client-side shadows on windows. -#no-dock-shadow = true; # Avoid drawing shadows on dock/panel windows. -#no-dnd-shadow = true; # Don't draw shadows on DND windows. -# clear-shadow = true; # Zero the part of the shadow's mask behind the window (experimental). -shadow-radius = 7; # The blur radius for shadows. (default 12) -shadow-offset-x = -7; # The left offset for shadows. (default -15) -shadow-offset-y = -7; # The top offset for shadows. (default -15) -shadow-exclude = [ - "! name~=''", - "n:e:Notification", - "n:e:Plank", - "n:e:Docky", - "g:e:Synapse", - "g:e:Kupfer", - "g:e:Conky", - "n:w:*Firefox*", - "n:w:*Chrome*", - "n:w:*Chromium*", - "class_g ?= 'Notify-osd'", - "class_g ?= 'Cairo-dock'", - "class_g ?= 'Xfce4-notifyd'", - "class_g ?= 'Xfce4-power-manager'", - "x = 0 && y = 0 && override_redirect = true" -]; - -# The shadow exclude options are helpful if you have shadows enabled. Due to the way compton draws its shadows, certain applications will have visual glitches -# (most applications are fine, only apps that do weird things with xshapes or argb are affected). -# This list includes all the affected apps I found in my testing. The "! name~=''" part excludes shadows on any "Unknown" windows, this prevents a visual glitch with the XFWM alt tab switcher. - -# Fading -# fading = true; # Fade windows during opacity changes. -fade-delta = 8; # The time between steps in a fade in milliseconds. (default 10). -fade-in-step = 0.03; # Opacity change between steps while fading in. (default 0.028). -fade-out-step = 0.03; # Opacity change between steps while fading out. (default 0.03). -#no-fading-openclose = true; # Fade windows in/out when opening/closing - -detect-client-opacity = true; # This prevents opacity being ignored for some apps. For example without this enabled my xfce4-notifyd is 100% opacity no matter what. - -# Window type settings -wintypes: -{ - tooltip = { fade = true; shadow = true; }; -}; - -#opacity-rule = ["90:class_g = 'URxvt'", "90:class_g = ''" ]; - - -opacity-rule = ["90:class_g = 'xfce4-terminal'", "95:class_g = 'Xfce4-terminal'", "90:class_g = 'termite'", "90:class_g = 'i3bar'", "90:class_g = 'i3-frame'", "90:class_g = 'Gnome-terminal'", "90:class_g = 'gnome-terminal-server'" ]; diff --git a/default-font.conf b/default-font.conf deleted file mode 100644 index b1de279..0000000 --- a/default-font.conf +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - NotoSans-Regular - - - serif - Noto Serif - - - sans-serif - Noto Sans Mono Bold - - - - monospace - - - SauceCodePro Nerd Font Mono - - - 100 - - - dz - - - 14 - - - - - diff --git a/gtk-3.0.css b/gtk-3.0.css deleted file mode 100644 index f347a83..0000000 --- a/gtk-3.0.css +++ /dev/null @@ -1,117 +0,0 @@ -/* -#vim-menubar, -#vim-menubar #menu, -#vim-toolbar, -#vim-gui-drawarea, -#vim-main-window { - color:#6060af; - color: #4e4e4e; - font-family: "Hasklug Nerd Font Mono", "Source Code Pro for Powerline", "Source Code Pro", "Roboto"; - font-weight:bold; - font-size:8pt; - border:0; - outline:0; -} - -* { - border-width:0px; - outline-width:0px; - padding:0; - margin:0; -} - -#vim-menubar -{ - padding-left:1em; - border-bottom:2px solid #ffffff; -} - -#vim-menubar>* -{ - padding-right:1em; - padding-top:.25em; - padding-bottom:.25em; -} - -#vim-menubar>*, -#vim-main-window { - background-color:#ffffff; - color: #4e4e4e; -} - -menu menuitem:backdrop, menu menuitem:backdrop:hover -{ - border:0px; -} -*/ - -window#vim-main-window > box -{ - background:#fff; - border:2px solid #fff; -} - -/* within window > box ... */ -menubar#vim-menubar { - font-family: "monospace", "Hasklug Nerd Font Mono", "Source Code Pro for Powerline", "Source Code Pro", "Roboto"; - font-weight:bold; - font-size:8pt; - background: #fff; - /* background: linear-gradient(180deg, white 85%, black); */ -} - -menubar#vim-menubar menuitem { - background:transparent; -} - -menubar#vim-menubar > menuitem { - padding:.25em; -} - -menubar#vim-menubar menuitem box { - padding:.1em .25em; -} - -menubar#vim-menubar menuitem window -{ - margin-top:1em; -} - -/* opened menu (after being clicked) */ -menubar#vim-menubar menuitem window menu { - padding:1px; - background:linear-gradient(90deg, #ccc, #fff); - -} - -menubar#vim-menubar menuitem window menu menuitem { - padding:0em; - margin:0px; -} - -menubar#vim-menubar menuitem window menu menuitem box { - background:rgba(255,255,255,.5); - padding:.25em; - padding-left:1em; - -} - -menubar#vim-menubar menuitem window menu separator { - margin:0; - background:#fff; - border-top:1px dotted #666; -} - - -menubar#vim-menubar menuitem:hover { - box-shadow:none; - background:rgba(0,0,0,.2); - color:#000; -} - - - -/* -toolbar button { -notebook tab { -*/ diff --git a/gvim-buffer.desktop b/gvim-buffer.desktop deleted file mode 100644 index 5cd2cbf..0000000 --- a/gvim-buffer.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Type=Application -Name=Gnome Vi IMproved Buffer -Icon=gvim -Comment=Open file in an existing instance of vi and in a new tab -MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; -Exec=gvim -f -N --remote-silent %F -Terminal=false -X-XClassHintResName=VIM -Categories=Utility;TextEditor; diff --git a/gvim.desktop b/gvim.desktop deleted file mode 100644 index 37c6e58..0000000 --- a/gvim.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Name=Vi IMproved Tab -Comment=Open file in an existing instance of vi and in a new tab -MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; -Exec=gvim f -N --remote-tab %F -Icon=gvim -Type=Application -Terminal=false -X-XClassHintResName=VIM -Categories=Utility;TextEditor; diff --git a/gvimrc b/gvimrc new file mode 100644 index 0000000..b4f2d70 --- /dev/null +++ b/gvimrc @@ -0,0 +1,29 @@ +" ====================================================================================================================== +" GUI_DEFAULTS: +" We want to have a minimal UI +" ====================================================================================================================== + +if has("gui_running") + set guicursor=a:block-blinkon100 + set browsedir=buffer + set toolbar+=text + set guiheadroom=0 + set guioptions+=eig + set guioptions-=T | " toolbar + set guioptions+=c | " use console dialogues instead of popups + set guioptions+=a | " auto select: copy&paste using middle click + set guioptions+=m | " remove menu + set guioptions-=e | " do not display tabs + set guioptions-=L | " do not show left scrollbar + set guioptions-=r | " do not show right scrollbar + set winaltkeys=menu | " behave like other windows: ALT-key can be used to open the menu (and cannot be :remaped) + " set selectmode=mouse,key,cmd | " enters vim's select mode when pressing shift-left or shift-END + " set keymodel=startsel,stopsel | " makes shift-left, shift-right available for selecting text + + " its possible to define alternative fonts (order matters), but we will + " use the systems default font and cofigure that if necessary + set guifont=Monospace\ 10 + + " like in the terminal: use Ctrl-shift-v for paste in vim's command editor + cnoremap * +endif diff --git a/init.vim b/init.vim deleted file mode 120000 index c9a3c9c..0000000 --- a/init.vim +++ /dev/null @@ -1 +0,0 @@ -vimrc \ No newline at end of file diff --git a/init.vim b/init.vim new file mode 100644 index 0000000..67bdf65 --- /dev/null +++ b/init.vim @@ -0,0 +1,35 @@ +exec ':source '.fnamemodify($MYVIMRC,':h').'/vimrc-common' + +set packpath+=pack/neovim + +"======================================================================================================================= +augroup DEOPLETE + inoremap deoplete#mappings#manual_complete() + + let g:deoplete#enable_at_startup = 1 + let g:echodoc#enable_at_startup = 1 + let g:LanguageClient_serverCommands = { + \ 'cpp': ['clangd'], + \ 'c': ['clangd'] + \ } + + packadd deoplete.nvim + packadd LanguageClient-neovim + packadd echodoc.vim +augroup END + +"======================================================================================================================= +augroup ALE + let g:ale_set_highlights = 0 + + let g:ale_sign_error = '' + let g:ale_sign_style_error = '' + let g:ale_sign_info = '' + let g:ale_sign_warning = '' + + highlight! link ALEWarningSign FoldColumn + + packadd ale +augroup END + + diff --git a/list-commands.vim b/list-commands.vim new file mode 100644 index 0000000..0dd4bca --- /dev/null +++ b/list-commands.vim @@ -0,0 +1,6 @@ + + + +for s in sort(getcompletion('', 'function')) + echo getcompletion(s, 'function') +endfor diff --git a/nvim.desktop b/nvim.desktop deleted file mode 100644 index 21f0090..0000000 --- a/nvim.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=1.0 -Type=Application -Name=Vim -Comment= -Exec=xfce4-terminal --icon /usr/share/icons/HighContrast/256x256/apps/vim.png -T 'nvim' -e '/bin/bash -i -c "env TERM=gnome-256color screen nvr ."' --fullscreen -Icon=/usr/share/icons/HighContrast/256x256/apps/vim.png -Path= -Terminal=false -StartupNotify=false diff --git a/plugin/AlignMapsPlugin.vim b/plugin/AlignMapsPlugin.vim new file mode 100644 index 0000000..7296f7f --- /dev/null +++ b/plugin/AlignMapsPlugin.vim @@ -0,0 +1,253 @@ +" AlignMapsPlugin: Alignment maps based upon and +" Maintainer: Dr. Charles E. Campbell. +" Date: Jan 07, 2013 +" +" NOTE: the code herein needs vim 7.0 or later +" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1 +" Permission is hereby granted to use and distribute this code, +" with or without modifications, provided that this copyright +" notice is copied with it. Like anything else that's free, +" AlignMaps.vim is provided *as is* and comes with no warranty +" of any kind, either expressed or implied. By using this +" plugin, you agree that in no event will the copyright +" holder be liable for any damages resulting from the use +" of this software. +" Romans 1:20 For the invisible things of Him since the creation of the {{{1 +" world are clearly seen, being perceived through the things that are +" made, even His everlasting power and divinity; that they may be +" without excuse. + +" --------------------------------------------------------------------- +" Usage: {{{1 +" Use 'a to mark beginning of to-be-aligned region, Alternative: use V +" move cursor to end of region, and execute map. (linewise visual mode) to +" The maps also set up marks 'y and 'z, and retain mark region, execute same +" 'a at the beginning of region. map. Uses 'a, 'y, and 'z. +" +" The start/end wrappers save and restore marks 'y and 'z. +" +" Although the comments indicate the maps use a leading backslash, +" actually they use (:he mapleader), so the user can +" specify that the maps start how he or she prefers. +" +" Note: these maps all use . +" +" Load Once: {{{1 +if &cp || exists("g:loaded_AlignMapsPlugin") + finish +endif +let s:keepcpo = &cpo +let g:loaded_AlignMapsPlugin = "v43" +set cpo&vim + +" ===================================================================== +" Public Interface: {{{1 +com! AlignMapsClean :call AlignMaps#AlignMapsClean() + +" ===================================================================== +" Maps: {{{1 + +" --------------------------------------------------------------------- +" WS: wrapper start map (internal) {{{2 +" Produces a blank line above and below, marks with 'y and 'z +if !hasmapto('WrapperStart') + map WS AlignMapsWrapperStart +endif +nnoremap