- vim
- vim plugins
- tmux
- git
- bash
- ghci
- cabal-install
- bin folder with useful tmux/git scripts
Automate the process of cloning and symlinking scripts:
curl https://raw.githubusercontent.com/KholdStare/dotfiles/master/clone-and-install.bash | bashIf you have already cloned the repository, link.bash and force.bash are available.
link.bash- creates symlinks to configuration files and scripts if those filenames don't already exist. Otherwise leaves things alone.force.bash- backs up existing files/links, and creates appropriate symlinks. If the correct links are already there, does nothing.- Both scripts are idempotent
A list of shortcuts that I don't want to forget. Anything marked with custom is either added or changed from default.
[I- lists all occurances of keyword in current and included files.
Commands:
/<pattern>- search\v- "very magic" patterns accept regular expressions
:s- substitute\%V- restrict substitution to visual selection (as opposed to whole lines)
ds<delim>- Delete surrounding delimeters.cs<delim-from><delim-to>- Change surrounding delimeters.- visual selection
S<delim>- Surround selection with delimiters.
Delimiters:
- Open brackets
{[(- surround with padding - Closed brackets
)]}- surround without padding <- XML/HTML tag. Prompts for attributes- Any punctuation mark
a- Angle brackets (since<is used for HTML)
<F6>- toggle NerdTree (custom):NERDTreeFind- Find current file in filesystem. (Type:N<Tab>F<Tab><CR>)
<F7>- open tagbar (custom)
Caches all files in current directory on first use (give it a few seconds), allowing very fast subsequent file searches
<space><space>/<C-p>- fuzzy search filenames in current directory<space>f- fuzzy search recently used filenames<space>b- fuzzy search open buffers
<Leader>c<space>- toggle comments on line(s).<Leader>cA- Append comment to end of line.<Leader>c$- Comments the current line from the cursor to the end of line.
See vimcast for demo: http://vimcasts.org/episodes/aligning-text-with-tabular-vim/
:Tabularize /=- align on equals sign
Gstatus- git status. Subcommands:o- open fileD- diff file-- stage/unstage fileC- start commit
GcommitGwrite- stage current fileGread- revert file to last checkinGblame- annotate lines with users/commit shasGedit- flip between working and committed versions of file.Gedit <sha>- look at commit/tree/blob in historyGit <command>- do a regular git command
See fugitive vimcasts:
- A complement to command line git
- Working with the git index
- Resolving merge conflicts with vimdiff
- Browsing the git object database
- Exploring the history of a git repository
- Shorthand text can be expanded into a full snippet by pressing
<Tab>- Try typing
main<Tab>in a c file. This will expand into the main function.
- Try typing
- Snippets can have several "holes" to fill in the skeleton.
- Move between holes using
<C-j>and<C-k> - Try typing
if<Tab>in a c file. Type the condition, and move to the body with<C-j>
- Move between holes using
See the official github for UltiSnips for more information.
