VIM¶
SAVING [HYBIRD]¶
If you close buffer or repace current buffer by new file, MAGNUS save all of current buffer for you.
If you want to save buffers actively, you can use shortcut keys below:
Keys | Mode | Notes |
---|---|---|
<F9> | NORMAL | Save and close current buffer |
<F10> | NORMAL | Save all of buffers |
<F12> | NORMAL | Save all of buffers then exit |
COMMAND-T [ACTIVE]¶
Quick open files.
Keys | Mode | Notes |
---|---|---|
t | NORMAL | Open search window |
<C>-c | INMODE | Exit open file mode |
<UP>, <DOWN> | INMODE | Move cursor between files |
<ENTER> | INMODE | Open file in current cursor |
It open sub window, then user should type file name into input. If file name matched, it list file names. Enter to open file to current window.
NERDCOMMENTER - [ACTIVE]¶
Comment/uncomment selected block.
Key | Mode | Notes |
---|---|---|
cc | NORMAL | Comment selected block |
cu | NORMAL | Uncomment selected block |
YOUCOMPLETEME - [HYBIRD]¶
Auto commplete.
Condition | Operation |
---|---|
At least 2 characters is typed | Open sub window and show suggestions |
<DOT>, <COMMA> is typed | Open sub window and show suggestions |
Keys | Mode | Notes |
---|---|---|
<TAB> | INMODE | Select next suggestion |
<S-TAB> | INMODE | Select prev suggestion |
<UP> | INMODE | Select above suggestion |
<DOWN> | INMODE | Select below suggestion |
<ENTER> | INMODE | Select suggestion in cursor |
SEARCH - [ACTIVE]¶
Keys | Mode | Notes |
---|---|---|
<BS> | NORMAL | Start searching |
<TAB> | INMODE | Select next result |
<ENTER> | INMODE | Start selection mode: SELMODE |
<TAB> | SELMODE | Move to position by characters |
HIGHLIGHTING - [PASSIVE]¶
Some programming languages such as C, C++, Python... and data format such as RestructureText, HTML... are enabled to highlight now, but it is very very simple and keep for everything are distraction. MAGNUS will highlight keywords, macros, identities and strings, other things aren’t highlight.
SESSION - [PASSIVE]¶
On opening, if file <./tmp/session.vim> is exist, MAGNUS loads it as session restoring.
On exiting, if file <./tmp/session.vim> is exist, MAGNUS create session file and save to <./tmp/session.vim>. So you MUST create session file by command to allow MAGNUS auto save/load session. You can done it by shortcut key:
Ctrl + F12In somecases, session restoring occurs some errors because functions, options, etc... no longer exist. For example: upgrade to new MAGNUS version. Then you MUST remove file <./tmp/session.vim> by toggle shorcut key:
Ctrl + F12If <./tmp/session.vim> is early exist then MAGNUS will removes it else MAGNUS will create it. Then exit and re-open vim to allow everything work correctly.
Keys | Mode | Notes |
---|---|---|
<C-F12> | NORMAL | Toggle create/remove session file |
MAKE [ACTIVE]¶
Build and goto error wiht C/C++
Keys | Mode | Notes |
---|---|---|
<F5> | Normal | Run ”./ctl build”, open error window |
<F7> | Normal | Goto prev error |
<F8> | Normal | Goto next error |
OTHER SHORCUT KEYS - [ACTIVE]¶
Keys | Mode | Notes |
---|---|---|
<TAB> | NORMAL | Open new tab |
<TAB> | NORMAL | Select next tab |
<C-TAB> | NORMAL | Select prev tab |
<F2> | NORMAL | Start invoke bash commands |
<F4> | NORMAL | Show ouput of prev bash commands |
REFERENCES¶
- auto-pairs
- https://github.com/jiangmiao/auto-pairs
- command-t
- https://github.com/wincent/command-t
- incsearch
- https://github.com/haya14busa/incsearch.vim
- incsearch-easymotion
- https://github.com/haya14busa/incsearch-easymotion.vim
- incsearch-fuzzy
- https://github.com/haya14busa/incsearch-fuzzy.vim
- nerdcommenter
- https://github.com/scrooloose/nerdcommenter
- vim-easymotion
- https://github.com/easymotion/vim-easymotion
- you-complete-me
- https://github.com/Valloric/YouCompleteMe