🐇 speed through Other People's Servers™ (minimal .rc files)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.bashrc
.gitconfig
.gitconfig.user
.gitignore_global
.inputrc
.vimrc
LICENSE
README.md
TODO.md
em.sh
install.sh
screenshot.png
sources.rc
symlinks.rc

README.md

Ninjarc

Super minimal .rc files for traipsing around Other People's Servers™

Why?

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, which is portable.

ninjarc screenshot

This is an experiment in minimalism as a response to my previous plugin-heavy, super customized workflow. Using every plugin under the sun was like unto a tacticool mallninja. Another goal is to minimise friction when using Vim mode in various IDEs such as Spacemacs and Atom, which don't necessarily have particular Vim plugins available.

Philosophy

Yes:

  • Speed
  • Simplicity
  • Small problem space, easy to hold in mind

Minimal:

  • Shortcuts to remember
  • Helper functions

No:

  • Dependencies to install
  • Plugins
  • Leader keys

Installation

git clone https://github.com/turnspike/ninjarc.git ~/ninjarc && chmod u+x ~/ninjarc/install.sh && ~/ninjarc/install.sh

Ninjarc will skip existing files by default. To force overwrite, run install.sh with the -f param:

~/ninjarc/install.sh -f

Bash notes

List aliases:

alias

List non-OS functions:

list-funcs

Vim notes

No plugins, mimimal config.

Living without plugins

Particular plugins might not be available in an IDE's Vim mode, so to minimize friction they are not used here. The Tim Pope plugins are pretty hard to give up - I may cave on this in the future as they're somewhat available in Spacemacs.

Related video: How to do 90% of what plugins do with just Vim

Commenting

Living without vim-commentary:

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>

Quoting

Living without vim-surround:

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"/

Files

Living without fzf.vim and NERDTree:

Fuzzyish file 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!

Buffers

Also living without fzf.vim:

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

Version control

There's no equivalent for GitGutter, so use git diff.


Known bugs

  • 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