Super minimal .rc files for traipsing around Other People's Servers™
Get In And Get Out of some random server with color and comfort. Zero dependencies to install. No plugins. The only external tool used is fuzzy-finder. This is an experiment in minimalism.
mkdir -p ~/.config && git clone https://github.com/turnspike/ninjarc.git ~/.config/ninjarc && chmod u+x ~/.config/ninjarc/install.sh && ~/.config/ninjarc/install.shNinjarc will skip existing files by default. To force overwrite, run install.sh with the -f param:
~/.config/ninjarc/install.sh -fTODO: add option to skip installation of Vim settings.
List aliases:
aliasList non-OS functions:
list-funcs| Action | Command |
|---|---|
| Search by filename in subdirs | <c-t> |
| Find and edit in vim | vim <c-t> |
| Search history | <c-r> |
| ??? | <alt-c> |
| Grep in subdirs | fzg<enter> |
| Find file and cd to subdir | cdf<enter> |
| Cd to git root | cdr<enter> |
Minimal plugins, mimimal config.
Related video: How to do 90% of what plugins do with just Vim
Living without vim-commentary:
| Action | Command |
|---|---|
| Comment a single line | I// <Esc> |
| Uncomment a single line | ^dw |
| Comment several lines | <c-v>jjj I//<esc> |
| Uncomment several lines | <c-v>jjj 2x<esc> |
Living without vim-surround:
| Action | Command |
|---|---|
| Quote a word | ciw'Ctrl+r" or ciw '' Esc P |
| Unquote a word | di'hPl2x |
| Change single quotes to double quotes | va':s/\%V'\%V/"/g |
| Quote all words in a line | :s/\v(\S+)/"\1"/ |
Living without fzf.vim and NERDTree:
| Action | Command |
|---|---|
| Fuzzyish filename find will look in subdirs |
:f name*<tab> or :f *.ext<tab> |
| Edit file in same directory as current file | :e %%/ |
| Open file browser | :E |
| Open file drawer | :Ve |
| Close file browser | :bd |
| Revert current file | :e! |
Also living without fzf.vim:
| Action | Command |
|---|---|
| Buffer list | :b <tab> |
| Switch to buffer by name | :b partialname<tab> or :b <tab>partialname<tab> |
| Cycle through all buffers | :b <tab><tab> |
| List all buffers | ls |
There's no equivalent for GitGutter, so use :!git diff.
- On MacOS, horizontal rules don't fit to new screen width when terminal is resized (tput cols is returning wrong value)
- On RHEL, install.sh -f won't force overwrite; workaround is to rm the relevant .rc files in ~ first
- Old versions of RHEL might not have go, so FZF will be unavailable
