Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VimBox Cheatsheet #266

Merged
merged 2 commits into from Jan 5, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
208 changes: 208 additions & 0 deletions cheatsheets/vimbox.rb
@@ -0,0 +1,208 @@
cheatsheet do
title 'VimBox' # Will be displayed by Dash in the docset list
docset_file_name 'vimbox' # Used for the filename of the docset
keyword 'vb' # Used as the initial search keyword (listed in Preferences > Docsets)
# resources 'resources_dir' # An optional resources folder which can contain images or anything else

introduction 'Modern MacVim Configuration: Mac Keyboard mappings, autocomplete, bundles etc.' # Optional, can contain Markdown or HTML

# A cheat sheet must consist of categories
category do
id 'Mac Key Commands' # Must be unique and is used as title of the category

entry do
command 'CMD+P' # Optional
command 'CTRL+P' # Multiple commands are supported
name 'Open Anything and begin searching for file' # A short name, can contain Markdown or HTML
end
entry do
command 'CMD+N'
name 'New Tab'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Common actions shouldn't be included.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, the trick is, that Vimbox's feature is exactly to setup these common actions, which are not there normally. That's why I added them.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see. That's ok then.

end
entry do
command 'CMD+SHIFT+N'
name 'New Window'
end
entry do
command 'CMD+SHIFT+T'
name 'Reopen Last Closed Tab'
end
entry do
command 'CMD+W'
name 'Close Active Tab'
end
entry do
command 'CMD+S'
name 'Save'
end
entry do
command 'CMD+Z'
name 'Undo'
end
entry do
command 'CMD+SHIFT+Z'
name 'Redo'
end
entry do
command 'CMD+ENTER'
name 'Distraction free full screen mode (enter/exit)'
end
entry do
command 'CMD+E'
name 'File explorer (NerdTree)'
end
entry do
command 'CMD+SHIFT+['
command 'CTRL+TAB'
command 'SHIFT+SPACE'
command 'SHIFT+TAB'
name 'Prev Tab'
end
entry do
command 'CMD+SHIFT+]'
command 'CTRL+SHIFT+TAB'
command 'SPACE'
command 'TAB'
name 'Next Tab'
end
entry do
command 'CMD+1'
name 'Tab 1'
end
entry do
command 'F5'
name 'Sort lines'
end
entry do
command 'CMD+SHIFT+P'
name 'Toggle Spell Check'
end
entry do
command 'CMD+/'
name 'Toggle Comments (line or selection)'
end
entry do
command 'CMD+SHIFT+M'
name 'Format & indent entire file, restore custor'
end
entry do
command 'CMD+R'
name 'Toggle quickfix list'
end
entry do
command 'CMD+SHIFT+R'
name 'Toggle Error List'
end
entry do
command 'CTRL+1'
name 'Back to VIM navigation mode (Mega Escape)'
end
entry do
command 'TAB'
command 'ENTER'
name 'Accept highlighted autocomplete entry'
notes <<-'END'
* tab also triggers a snippet when applicable, and tab will allow "tabbing" through the snippet placeholders.'
* place custom snippets in ~/.vim/myUltiSnippets/
* CTRLL+ENTER / SHIFT+ENTER to insert newline when autocomplete window is open
END
end
end

category do
id 'File Explorer / NerdTree'

entry do
command 'CMD+E'
name 'Reveal current file in side bar file explorer'
end

entry do
command 'j'
name 'Move up'
end

entry do
command 'k'
name 'Move down'
end

entry do
command 'ENTER'
name 'Opens a file in new tab or jump to existing window if already open'
end

entry do
command 's'
name 'Opens a file in vertical split or jump to existing window if already open'
end

entry do
command 'h'
name 'Opens a file in horizontal split or jump to existing window if already open'
end

entry do
command 'u'
name 'Move up a directory'
end

entry do
command 'o'
name 'Expand sub-directory'
end

entry do
command 'CD'
name 'Set file explorer dir to Vim CWD'
end

entry do
command 'cd'
name 'Set Vim CWD to file explorer directory'
end

entry do
command 'm'
name 'Show menu of possible commands'
end

end

category do
id 'Command-P'

entry do
command 'ENTER'
name 'While searching, opens the top hit in new tab or jump to existing window if already open'
end

entry do
command 'c-s'
name 'While searching, opens the top hit in a vertical split or jump to existing window if already open'
end

entry do
command 'c-h'
name 'While searching, opens the top hit in a horizontal split or jump to existing window if already open'
end

entry do
command 'CMD+SHIFT+C'
name 'While searching, refreshes the search results if files have changed on disk'
end

entry do
command 'CTRL+C'
name 'Kill slow search'
end
end

# todo reminder
# category do
# id 'Javascript Support'
# end

notes 'See: https://github.com/jordwalke/vimbox'
notes 'Created by Robert M. Münch, Saphirion AG, Switzerland'
end