Cookie's VIM config
This is my personal VIM config, I like it very much.
The configuration is split up in multiple
so everything looks nice and clean (and maybe even
It is verified to work on these systems:
vimon GNU/Linux in GNOME terminal or kitty
vimon Termux for Android
If you want this VIM config, do this in your Terminal:
mv ~/.vim ~/.vim__NOTSOAWESOME; mv ~/.vimrc ~/.vimrc__NOTSOAWESOME; git clone https://github.com/cookiengineer/dotvim ~/.vim; ln -s ~/.vim/.vimrc ~/.vimrc;
The plugins are contained in ./plugged and are statically shipped in this repository (for the sake of having a known-to-work-failsafe history).
For details on plugins and how to update, read Plugins and Updates respectively down below.
- Copy/Paste from GUI applications into Terminal
- Copy/Paste leads to auto-indented code
Auto commands are defined in autocmds.vim.
BufWritePreremoves trailing whitespaces.
FileWritePrecreates non-existing parent folder paths via
FileChangedShellPosthave been modified to echo the warning instead of opening an annoying shell.
:Wwill write files with
Key Bindings that don't require a plugin are defined in mappings.vim,
those that do are defined in the
[F2]turns off highlighting (
/<search>in normal mode).
[F3]formats, auto-indents and auto-lints the current buffer.
[Shift] + [-]on US keyboard) toggles current window zoom (aka fullscreen mode).
[p]auto formats bad indents on paste.
[Ctrl] + [E], [S]creates a new tab.
[Ctrl] + [E], [V]creates a new tab.
[Ctrl] + [E], [C]closes the current tab.
[Ctrl] + [E], [Arrow Key]moves focus to different tab.
[Ctrl] + [E], [H/L]moves focus to different tab.
[Ctrl] + [W], [S]horizontally splits current window.
[Ctrl] + [W], [V]vertically splits current window.
[Ctrl] + [W], [Arrow Key]moves focus to different window.
[Ctrl] + [W], [H/J/K/L]moves focus to different window.
Additional Bindings are defined in settings.tradewinds.vim.
[Shift] + [W], [Arrow Key]moves the current window.
[Shift] + [W], [H/J/K/L]moves the current window.
Error Navigation Bindings are defined in settings.ale.vim.
[Ctrl] + [Arrow Key]moves focus to to different linting error.
[Ctrl] + [J/K]moves focus to different linting error.
[g], [f]opens File under cursor in current window.
[g], [x]opens Browser or Application via
Normal Mode and Visual Mode
Additional Bindings are defined in settings.move.vim.
[Ctrl] + [J/K]moves currently selected block.
The templates are defined in templates.vim
,cssinserts the default.css template
,htmlinserts the default.html template
,mjsinserts the default.mjs template
,eslintrcinserts the eslintrc.json template
,makeinserts the make.mjs template
,packageinserts the package.json template
zen.vim file is modified to use
git clone --depth=1 --single-branch --branch=master
in order to save bandwidth. In order to make a full plain copy,
just remove the subfolders in ./plugged, do a
vim, and execute the bin/clean.sh file afterwards
It is wise to modify the bin/clean.sh when some
unnecessary bloat was added to plugins and appear in a
afterwards (Pull Requests welcomed).