with tags Vim
Core Functionality (Vocabulary)
- C delete current line (after current cursor position) and enter insert mode
- D delete current line (after current cursor position)
- dd delete current line
- ciw *deleting the current word*
- cit *deleting between the current html tag*
- ci) *deleting between the ()*
- With surround plugin:
- ds' *deleting the surrounding '*
- cs'" *changing the surrounding ' for "s*
- / *incremental search*
- o/O inserting new lines.
- 1) Cursor movement commands (hjkl)
- 2) Move by word (w and b) and page (^f and ^b)
- 3) Search for word under cursor (forward * and backward #)
- 4) File commands (:w, :new)
- 5) Split buffer (:split) and buffer movement (^w and hjkl)
- 6) Tab commands (:tabnext, :tabnext etc, bound to ",tn", ",n", ",p" etc)
- 7) File explorer (:Explore(), bound to ,f)
- 8) Move to start and end of file (gg and G)
- 9) Switch modes (v, V for linewise, i, esc)
- 10) Basic register operations (dd, y, p, P)
C - delete until end of line and enter insert mode.
B - increase indentation of current block
Great in depth answer about registers: https://stackoverflow.com/a/3997110
A great explanation of leader keys: https://tuckerchapman.com/2018/06/16/how-to-use-the-vim-leader-key/
ALE - Asynchronous Lint Engine
Seems like it requires VIM 8.0 or greater at this point; so install vim from source or use this PPA which seems semi-legit: https://launchpad.net/~jonathonf/+archive/ubuntu/vim
Currently using https://github.com/neomake/neomake but should look into using ALE instead as neomake seems a bit buggy in my experience.
See here for good info on how to generate tags: https://github.com/shawncplus/phpcomplete.vim/wiki/Getting-better-tags; it sounds like the original ctags program is abandoned, so it's best to use https://github.com/universal-ctags/ctags or possibly https://github.com/vim-php/phpctags (obviously if you only need PHP tags). Seems like universal-ctags is a fairly active project so it seems like a good option.
Available as a snap for linux: https://github.com/universal-ctags/ctags-snap, though there are some caveats due to security restrictions, including the inability to generate tags for projects outside of the user's home directory.
Compiling from source (instructions) instead, since there isn't a good PPA or ubuntu package:
git clone https://github.com/universal-ctags/ctags.git
sudo make install
Tips on MacOS
brew install ctags
Automatically regenerate tag files with https://github.com/ludovicchabant/vim-gutentags
Useful to install supertab which maps tab to the control-x + control-o hotkey that triggers omnicomplete, in a way that is compatible with snippets. Good article here on setup: https://jordaneldredge.com/blog/setting-up-php-completion-in-vim/
Maybe a better version of phpcomplete: https://github.com/lvht/phpcd.vim
Enhanced Statusline Options
lightline seems like a good option.
lightline color schemes: https://github.com/itchyny/lightline.vim/blob/master/colorscheme.md
yss: add surrounding character(s) to current line
- good simple cheatsheet: http://fprintf.net/vimCheatSheet.html
- attempt at a graphical cheatsheet: http://www.viemu.com/vi-vim-cheat-sheet.gif
- attempt at a graphical cheatsheet: http://michael.peopleofhonoronly.com/vim/vim_cheat_sheet_for_programmers_screen.pdf
- a good text cheatsheet: http://vimsheet.com/ and advanced: http://vimsheet.com/advanced.html
- An interesting "out-of-the-box" vim setup including some common plugins and features (looks a bit neglected / out of date): https://github.com/carlhuda/janus