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
VimBox Cheatsheet #266
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
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 |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.