Cdelete current line (after current cursor position) and enter insert mode
Ddelete current line (after current cursor position)
dd delete current line
ciw delete the current word
citdelete between the current html tag
ci) delete between the ()
1) Cursor movement commands (hjkl)
10) Basic register operations (dd, y, p, P)
C - delete until end of line and enter insert mode.
B - increase indentation of current block
] jump to tag definition
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/
If vim plug is acting up; force it to download the latest version with:
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 https://github.com/universal-ctags/ctags/blob/master/docs/autotools.rst instead, since there isn't a good PPA or ubuntu package:
git clone https://github.com/universal-ctags/ctags.git cd ctags ./autogen.sh ./configure make sudo make install
brew install ctags
Automatically regenerate tag files with https://github.com/ludovicchabant/vim-gutentags
:CocInfo to debug
:CocInstall coc-phpls for php language server
List of extensions and extension docs: https://github.com/neoclide/coc.nvim/wiki/Using-coc-extensions
Discussion about setup for PHP / Laravel: https://github.com/neoclide/coc.nvim/issues/590
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
https://github.com/itchyny/lightline.vim seems like a good option.
lightline color schemes: https://github.com/itchyny/lightline.vim/blob/master/colorscheme.md
Install it just for the
:Toc command, which brings up a sidebar table of contents for the current markdown document.
Generate a table of contents and insert into document:
Config entries for
let g:vim_markdown_toc_autofit = 1 let g:vim_markdown_folding_disabled = 1 let g:vim_markdown_frontmatter = 1
ds'delete the surrounding single quotes
cs'"changing the surrounding single quote for double quote
o/Oinserting new lines
yssadd surrounding character(s) to current line
Official PHP indentation plugin for VIm: https://github.com/2072/PHP-Indenting-for-VIm
https://github.com/keith/investigate.vim - cool plugin that launches various docs for the keyword under the cursor
Vim wrapper for UNIX shell commands:
:Delete: Delete a buffer and the file on disk simultaneously.
:Delete, but keeps the now empty buffer.
:Move: Rename a buffer and the file on disk simultaneously.
:Move, but relative to the current file's containing directory.
:Chmod: Change the permissions of the current file.
:Mkdir: Create a directory, defaulting to the parent of the current file.
findand load the results into the quickfix list.
locateand load the results into the quickfix list.
:Llocate: Like above, but use the location list.
:Wall: Write every open window
:SudoWrite: Write a privileged file with
:SudoEdit: Edit a privileged file with
sudo -eis based on original file name.