Vimhack/dotfiles is a Fantastic Development Environment, built with Vim/Neovim, Tmux, Zsh, Alacritty and many other related excellent open source softwares.
The supported platforms currently are macOS and Linux.
For efficient and convenient use of shortcuts, I strongly recommend using HHKB keyboard, or a keyboard capable of changing the key position and change Caps to Ctrl.
If you use MacBook, you can use Karabiner-Elements to modify the Caps to left Ctrl easily.
- Requirements Installation
- Installation
- Colorscheme/Theme
- Alacritty
- Zsh(OhMyZsh)
- Tmux
- Prefix Key
- Key Bindings
- Tmux Plugins
- tmux-plugins/tpm
- tmux-plugins/tmux-prefix-highlight
- tmux-plugins/tmux-resurrect
- tmux-plugins/tmux-continuum
- tmux-plugins/tmux-copycat
- tmux-plugins/tmux-yank
- tmux-plugins/tmux-open
- ki-chi/tmux-inputmethod
- vimhack/tmux-show-colorscheme
- vimhack/tmux-audio-volume
- vimhack/tmux-battery
- vimhack/tmux-cpu
- vimhack/tmux-onlinestatus
- vimhack/tmux-weather
- vimhack/tmux-moon-phase
- FQA
- Vim/Neovim
- Leader Key
- Custom Key Bindings
- Custom Snippets
- Put Your Own Customization
- Vim/Neovim Plugins
- Code AutoCompletion
- Code Static Check
- Code Debug
- User Interface
- mhinz/vim-startify
- voldikss/vim-floaterm
- majutsushi/tagbar
- vimhack/lightline.vim
- maximbaz/lightline-ale
- luochen1990/rainbow
- Yggdroot/indentLine
- machakann/vim-highlightedyank
- unblevable/quick-scope
- wellle/context.vim
- uguu-org/vim-matrix-screensaver
- rrethy/vim-hexokinase
- ryanoasis/vim-devicons
- tiagofumo/vim-nerdtree-syntax-highlight
- Programming Languages
- File Navigation
- Text Editing
- Cursor Movement
- Git Related
- Colorschemes
- dracula/vim
- morhetz/gruvbox
- vimhack/molokai
- sickill/vim-monokai
- lifepillar/vim-solarized8
- rakr/vim-one
- sonph/onehalf
- cocopon/iceberg.vim
- nanotech/jellybeans.vim
- arcticicestudio/nord-vim
- NLKNguyen/papercolor-theme
- ayu-theme/ayu-vim
- Rigellute/rigel
- preservim/vim-colors-pencil
- cormacrelf/vim-colors-github
- srcery-colors/srcery-vim
- rhysd/vim-color-spring-night
- google/vim-colorscheme-primary
- embark-theme/vim
- chriskempson/base16-vim
- pbrisbin/vim-colors-off
- Others
- License
π¦ Requirements Installation β
See here.
π Installation β
To install, run the following from your terminal: (please backup your existing dotfiles first)
# Make sure the target directory is '~/.dotfiles'.
git clone --depth=1 https://github.com/vimhack/dotfiles.git ~/.dotfiles
# Zsh
ln -sf ~/.dotfiles/zsh/zshrc ~/.zshrc
# Vim
mkdir ~/.vim
ln -sf ~/.dotfiles/vim/vimrc ~/.vimrc
ln -sf ~/.dotfiles/vim/coc-settings.json ~/.vim/coc-settings.json
ln -sf ~/.dotfiles/vim/markdownlint.yaml ~/.markdownlint.yaml
# I suggest regularly updating Vim plugins and Coc plugins in Vim's command-line mode.
# Update vim plugins
:PlugUpdate
# Update coc plugins
:CocUpdate
# Neovim
mkdir -p ~/.config/nvim && ln -sf ~/.dotfiles/vim/vimrc ~/.config/nvim/init.vim
ln -sf ~/.dotfiles/vim/coc-settings.json ~/.config/nvim/coc-settings.json
# Tmux
ln -sf ~/.dotfiles/tmux/tmux.conf ~/.tmux.conf
# Add your own configurations in this file.
touch ~/.tmux.local.conf
# Alacritty
mkdir -p ~/.config/alacritty
\cp ~/.dotfiles/alacritty/alacritty.yml ~/.config/alacritty/alacritty.yml
\cp ~/.dotfiles/alacritty/alacritty_private.yml ~/.alacritty_private.yml
Then open or reopen the alacritty, if it is the first time to run, you may need to wait a while, because the tmux plugins are automatically installed in the background.
In addition, when vim or nvim is started, if there are vim plugins that have been configured but not yet installed, they will be installed automatically.
To update:
cd ~/.dotfiles
git pull
Enjoy itπ
π Colorscheme/Theme β
In Terminal Command Line β
Change colorscheme of Vim/Neovim and Alacritty β
$ colorscheme
Current colorscheme is 'dracula', and it can be changed to one of the following list:
* gruvbox
* solarized
* molokai
* monokai
* rigel
* jellybeans
* nord
* tender
* one
* iceberg
* papercolor
* ayu
* ayu_mirage
* onehalf
* vadelma
* pencil
* srcery
* springnight
* google
* github
* embark
* off
* base16
* flat
* materia
* atelierdune
* oceanicnext
* gruvbox_light
* solarized_light
* one_light
* iceberg_light
* papercolor_light
* ayu_light
* onehalf_light
* vadelma_light
* pencil_light
* google_light
* github_light
* off_light
* cupertino
* atelierdune_light
For example, change colorscheme to 'atelierdune_light':
$ colorscheme atelierdune_light
or
$ cs atelierdune_light
π‘ Light colorschemes are good in the morning or at a place with natural light.
Change font of Alacritty β
$ font
Current font is 'Hasklug_Light', and it can be changed to one of the following list:
* Hack_Regular
* BlexMono_Book
* BlexMono_Light
* BlexMono_ExtraLight
* BlexMono_Thin
* SauceCodePro_Regular
* SauceCodePro_Light
* SauceCodePro_ExtraLight
* JetBrainsMono_Regular
* JetBrainsMono_Light
* JetBrainsMono_ExtraLight
* JetBrainsMono_Thin
* RobotoMono_Regular
* RobotoMono_Light
* RobotoMono_Thin
* Hasklug_Regular
* Hasklug_ExtraLight
* VictorMono_Regular
* VictorMono_Light
* VictorMono_ExtraLight
* VictorMono_Thin
* FantasqueSansMono_Regular
* LiterationMono_Book
* Lekton_Regular
* DejaVuSansMono_Book
* GoMono_Book
* mononoki_Regular
* Cousine_Regular
* SpaceMono_Regular
* UbuntuMono_Regular
* CodeNewRoman_Book
* CaskaydiaCove_Regular
* CaskaydiaCove_Light
* CaskaydiaCove_SemiLight
* CaskaydiaCove_ExtraLight
* FiraCode_Regular
* FiraCode_Light
* Hurmit_light
* DaddyTimeMono_Book
* OpenDyslexicMono_Regular
* Monofur_Book
For example, change font to 'Monofur_Book':
$ font Monofur_Book
or
$ ft Monofur_Book
Change font size of Alacritty β
$ font-size
Current font size is '12', and it can be changed by:
$ font-size number
or
$ fs number
* number must between 1 and 200
Change opacity of Alacritty β
$ opacity
Current opacity is '0.9', and it can be changed by:
$ opacity number
or
$ o number
* number must between 0 and 1
Toggle Vim/Neovim background transparent β
$ toggle-vim-transparent
or
$ tv
Toggle Alacritty background transparent β
$ toggle-alacritty-transparent
or
$ to
Print 256 colors β
$ colors-print
or
$ c
$ print-256-hex-colors
or
$ hex
Print Icons β
$ print-icons
or
$ icons
With Keyboard Shortcuts/Hotkey β
ctrl a
follows is the tmux prefix key.
Change colorscheme of Vim/Neovim and Alacritty randomly β
ctrl a v
Change font of Alacritty randomly β
ctrl a shift f
Toggle Alacritty background transparent β
ctrl a shift o
Increase Alacritty background transparent β
ctrl a ctrl k
Decrease Alacritty background transparent β
ctrl a ctrl j
Toggle Tmux status line β
ctrl a b
Toggle Tmux pane-border-status(pane name) β
ctrl a ctrl b
In Vim Normal Mode β
Toggle Vim/Neovim background color(light or dark) β
,b
π‘ Only support colorschemes that have both dark and light background color.
Toggle Vim/Neovim background transparent β
,o
π‘ Opacity of Alacritty(terminal) must be less than 1.
πΊ Alacritty β
Shortcut | Action |
---|---|
Command h |
Hide the current Alacritty terminal |
Command m |
Minimize the current Alacritty to the Dock |
Command q /w |
Quit Alacritty |
Command n |
Spawn new instance of Alacritty |
Command f /b |
Search forward or backward |
Command + /- /0 |
Increase/Decrease/Reset font size |
Ctrl Command f |
Toggle full screen |
Ctrl l |
Clear warning/error messages of Alacritty in status line |
Command Option h |
Hiding all windows other than the current Alacritty |
π Zsh(OhMyZsh) β
Reload ~/.zshrc
β
$ omz reload
or
$ exec zsh
-
$ ff
Search file by
fzf
and then open it byvim
. -
Ctrl
t
List all files and dirs of the current dir, then select one and
enter
, it will paste the selected file name to the command line. -
Option
/Alt
c
List all dirs of the current dir, then select one and
enter
, it will switch to the selected dir. -
Ctrl
r
List history commands, then input keywords and select the specific one, and
enter
, it will paste the selected command to the command line. -
Ctrl
k
/j
Select up or down in file/dir list or history command list.
-
Ctrl
p
/n
The same as
Ctrl
k
/j
. -
Ctrl
c
/Ctrl
g
/esc
Quit from file/dir list or history command list.
Custom Commands β
$ vol
Usage of audio-volume:
digit Set volume value, 1~100
-p, --print Print all audio devices
-n, --next Switch to the next audio device
-i device_id Switch to the given audio device
$ s
Usage:
ssh-sessions /yourpath/tmux_window[.extension]
Content format of /yourpath/tmux_window[.extension]:
node1.example.com
node2.example.com
node3.exmaple.com
...
Note:
Make sure the hosts in /yourpath/tmux_window.extension
can login without password by ssh public key authentication.
Examples:
$ ssh-sessions ~/.xxxhosts.ssh
or
$ ssh-sessions ~/.xxxhosts
or
$ ssh-sessions ~/xxxhosts
OhMyZsh Plugins β
vi-mode β
~/.oh-my-zsh/plugins/web-search/README.md
First of all, use esc or Ctrl [
to enter Normal mode
.
ctrl
p
: Previous command in historyctrl
n
: Next command in history/
: Search backward in historyn
: Repeat the last/
vv
: Edit current command line in Vim
$
: To the end of the line^
: To the first non-blank character of the line0
: To the first character of the linew
: [count] words forwardW
: [count] WORDS forwarde
: Forward to the end of word [count] inclusiveE
: Forward to the end of WORD [count] inclusiveb
: [count] words backwardB
: [count] WORDS backwardt{char}
: Till before [count]'th occurrence of {char} to the rightT{char}
: Till before [count]'th occurrence of {char} to the leftf{char}
: To [count]'th occurrence of {char} to the rightF{char}
: To [count]'th occurrence of {char} to the left;
: Repeat latest f, t, F or T [count] times,
: Repeat latest f, t, F or T in opposite direction
i
: Insert text before the cursorI
: Insert text before the first character in the linea
: Append text after the cursorA
: Append text at the end of the lineo
: Insert new command line below the current oneO
: Insert new command line above the current one
ctrl-h
: While in Insert mode: delete character before the cursorctrl-w
: While in Insert mode: delete word before the cursord{motion}
: Delete text that {motion} moves overdd
: Delete lineD
: Delete characters under the cursor until the end of the linec{motion}
: Delete {motion} text and start insertcc
: Delete line and start insertC
: Delete to the end of the line and start insertr{char}
: Replace the character under the cursor with {char}R
: Enter replace mode: Each character replaces existing onex
: Deletecount
characters under and after the cursorX
: Deletecount
characters before the cursor
git β
~/.oh-my-zsh/plugins/git/README.md
gst
: git statusgsh
: git showga
: git addgc
: git commit -vgp
: git pushgpf
: git push -fglo
: git log --oneline --decorateglog
: git log --oneline --decorate --graphgl
: git pull
gitignore β
~/.oh-my-zsh/plugins/gitignore/README.md
gi list
: List all the currently supported gitignore.io templates.gi [TEMPLATENAME]
: Show git-ignore output on the command line, e.g.gi java
to exclude class and package files.gi [TEMPLATENAME] >> .gitignore
: Appending programming language settings to your projects .gitignore.
web-search β
~/.oh-my-zsh/plugins/web-search/README.md
You can use the web-search
plugin in these two forms:
web_search <context> <term> [more terms if you want]
<context> <term> [more terms if you want]
For example, these two are equivalent:
$ web_search google oh-my-zsh
$ google oh-my-zsh
Available search contexts are:
Context | URL |
---|---|
bing |
https://www.bing.com/search?q= |
google |
https://www.google.com/search?q= |
yahoo |
https://search.yahoo.com/search?p= |
ddg or duckduckgo |
https://www.duckduckgo.com/?q= |
sp or startpage |
https://www.startpage.com/do/search?q= |
yandex |
https://yandex.ru/yandsearch?text= |
github |
https://github.com/search?q= |
baidu |
https://www.baidu.com/s?wd= |
ecosia |
https://www.ecosia.org/search?q= |
goodreads |
https://www.goodreads.com/search?q= |
qwant |
https://www.qwant.com/?q= |
givero |
https://www.givero.com/search?q= |
stackoverflow |
https://stackoverflow.com/search?q= |
wolframalpha |
https://wolframalpha.com/input?i= |
archive |
https://web.archive.org/web/*/ |
scholar |
https://scholar.google.com/scholar?q= |
colorize β
~/.oh-my-zsh/plugins/colorize/README.md
-
ccat <file> [files]
: colorize the contents of the file (or files, if more than one are provided). If no files are passed it will colorize the standard input. -
cless [less-options] <file> [files]
: colorize the contents of the file (or files, if more than one are provided) and open less. If no files are passed it will colorize the standard input. The LESSOPEN and LESSCLOSE will be overwritten for this to work, but only in a local scope.
sudo β
~/.oh-my-zsh/plugins/sudo/README.md
Easily prefix your current or previous commands with sudo
by pressing esc twice.
copyfile β
~/.oh-my-zsh/plugins/copyfile/README.md
copyfile <filename>
: Puts the contents of a file in your system clipboard so you can paste it anywhere.
copydir β
~/.oh-my-zsh/plugins/copydir/README.md
copydir
: Copy the $PWD to the system clipboard.
aliases β
~/.oh-my-zsh/plugins/aliases/README.md
With lots of 3rd-party amazing aliases installed, this plugin helps list the shortcuts that are currently available based on the plugins you have enabled.
acs
: Group all aliasacs <keyword>
: Quickly filter alias & highlight
πΉ Tmux β
Prefix Key β
Prefix Key: Ctrl a
All the following shortcuts keys must first press the prefix key.
Note that after pressing the prefix key, you need to release the prefix key first, and then press other specific shortcut keys.
Key Bindings β
Common β
?
: List key bindingsr
: Reload~/.tmux.conf
e
: Edit~/.tmux.conf
K
: View help documents of the object in~/.tmux.conf
d
: Detach the current client
Session β
s
: Choose a session from a listOption/Alt
f
: Search sessionCtrl
c
: Create new session$
: Rename the current sessionb
: Toggle status line of the current session
Window β
c
: Create new window,
: Rename current window.
: Move current windown
: Select the next windowp
: Select the previous window0-9
: Select window 0-9&
: Kill current windoww
: Choose a window from a listf
: Search windowi
: Display window information
Pane β
%
: Split window horizontally"
: Split window vertically<Space>
: Select next layoutCtrl
E
: Spread panes out evenlyx
: Kill the active panez
: Zoom the active pane{
/<
: Swap the active pane with the pane above}
/>
: Swap the active pane with the pane belowq
: Display pane numbers(it will also display a letter if the number gather than 10), then press the specified number(or letter) to select it.t
: Show a clock in current pane!
: Break pane to a new window;
: Move to the previously active panek
: Select the pane above the active panej
: Select the pane below the active paneh
: Select the pane to the left of the active panel
: Select the pane to the right of the active paneo
: Select the next paneCtrl
o
: Rotate through the panesOption/Alt
o
: Rotate through the panes in reversem
: Toggle the marked paneK
: Resize the pane upJ
: Resize the pane downH
: Resize the pane leftL
: Resize the pane rightCtrl
l
: Clear all the messages(include history messages) in the active paneCtrl
b
: Toggle pane name of the current window's all panesCtrl
t
: Create a new pane that is 16% of the size of the current pane and below the current pane
Copy Mode β
[
: Enter copy mode]
: Paste the most recent paste buffer
NOTE: The followings is the operations after entered copy mode, no need to press the Prefix Key first.
q
: Exit from copy modehjhl
: Movementsv
: Text selectV
: Text line selectCtrl
v
: Text block selectenter
: Copy the selected textesc
: Escape from text selected/
: Search down?
: Search up
Enabled vi-mode
, many vi shortcuts can be used in this scenario.
Sync Mode β
Ctrl
y
: Toggle sync mode
Tmux Plugins β
Tmux Plugin Manager.
I
: Install new pluginsU
: Update all pluginsu
: Uninstall plugins that not in~/.tmux.conf
Plugin that highlights when you press tmux prefix key.
This plugin saves all the little details from your tmux environment so it can be completely restored after a system restart (or when you feel like it).
Ctrl
s
: Save sessionsCtrl
r
: Restore sessions from local backup
Continuous saving of tmux environment. Automatic restore when tmux is started.
-
/
: Regex search (strings work too)Example search entries:
foo
: Searches for string foo[0-9]+
: Regex search for numbers
Ctrl
f
: Simple file searchCtrl
g
: Jumping over git status files (best used after git status command:git status -sb
)Ctrl
h
: Jumping over SHA-1/SHA-256 hashes (best used after git log command)Ctrl
u
: URL search (http, ftp and git urls)Ctrl
d
: Number search (mnemonic d, as digit)Ctrl
i
: IP address searchS
: Jumping over string surrounded by""
These start "copycat mode" and jump to first match.
These are enabled when you search with copycat:
n
: Jumps to the next matchN
: Jumps to the previous matchenter
: Copy a highlighted match
- Tmux Normal Mode
y
: Copies text from the command line to the clipboard.Y
: Copy the current pane's current working directory to the clipboard.
- Tmux Copy Mode
y
: Copy selection to system clipboard.Y
: Equivalent to copying a selection, and pasting it to the command line.
Plugin for opening highlighted selection directly from Tmux copy mode.
In Tmux Copy Mode:
o
: Open a highlighted selection with the system default program. open for OS X or xdg-open for Linux.Ctrl
o
: Open a highlighted selection with the $EDITORS
: Search the highlighted selection directly by GoogleB
: Search the highlighted selection directly by Bing
Display current input method in the Tmux status line.
Display current colorscheme/opacity/font/font-size of Vim and Alacritty in the Tmux status line.
Display system volume in the Tmux status line.
Display battery status in the Tmux status line.
Display cpu utilization and fan speed in the Tmux status line.
Display online status in the Tmux status line.
Display local weather information in the Tmux status line.
Display moon phase emoji or icon or text in the Tmux status line.
FQA β
- In some cases, modifying
~/.tmux.conf
cannot take effect after reload or restart Tmux, how to fix it?
$ tmux kill-server
- Even if execute
tmux kill-server
, the new configuration still does not take effect.
$ ps axu|grep -v grep|grep tmux|awk '{print $2}'|xargs kill -9
π― Vim/Neovim β
Leader Key β
The vim leader key has been changed from \
(default) to ,
.
,
in the following shortcut keys represent the leader key.
Custom Key Bindings β
Tabs Management β
-
Normal Mode
Ctrl
t
: Create new tab,
1
/2
/3
... : Go to the specific tab,
0
: Go to the last tabOption/Alt
1
/2
/3
... : Go to the specific tabOption/Alt
0
: Go to the last tab,
fn
: Go to the next tab,
fp
: Go to the previous tab,
fh
: Move the tab to the left,
fl
: Move the tab to the right,
qo
: Close all tabs except current one,
qq
: Close current tab,
q
1
/2
/3
... : Close the specific tab,
q
0
: Close the last tab
-
Insert Mode
Option/Alt
1
/2
/3
... : Go to the specific tabOption/Alt
0
: Go to the last tab
Cursor Movement β
-
Normal Mode
Ctrl
k
/j
/h
/l
: Move the cursor to up/down/left/right windowCtrl
e
/y
: Move the screen down or up by 3 lines step0
: Move the cursor to the first non-blank character, if already at the first character, then to the first character.
-
Insert Mode
Ctrl
p
/n
/b
/f
: Move the cursor to up/down/left/rightCtrl
e
: Move the cursor to the end of the lineCtrl
a
: Press twice for moving the cursor to the first non-blank character, and press twice once again for moving the cursor to the first character.NOTE: Press twice coz
Ctrl
a
is also the tmux prefix key.Option/Alt
b
/f
: Move the cursor to left/right by one word step
-
Visual Mode
0
: Move the cursor to the first non-blank character, if it already at the first character, then to the first character.
-
Command-Line Mode
Ctrl
b
/f
: Move the cursor to left/rightCtrl
p
/n
: Go through history commands from up/downCtrl
a
/e
: Move the cursor to the first character or the end of the lineOption/Alt
b
/f
: Move the cursor to left/right by one word step
Text Edit β
-
Insert Mode
Ctrl
h
/l
: Delete a character from left/rightCtrl
d
: Delete from the cursor position to the end of the line.Ctrl
u
: Delete from the cursor position to the head of the line.Ctrl
w
: Delete a word from left
-
Visual Mode
,
)
/]
/}
/"
/'
: Surround the selected text by)
or]
or}
or"
or'
>
/<
: Use>
or<
to indent without exiting visual mode
-
Command-Line Mode
Ctrl
h
/l
: Delete a character from left/rightCtrl
d
: Delete from the cursor position to the end of the line.Ctrl
u
: Delete from the cursor position to the head of the line.Ctrl
w
: Delete a word from left
Others β
-
Normal Mode
E
: Edit~/.vimrc
or~/.config/nvim/init.vim
in the new split windowR
: Reload~/.vimrc
or~/.config/nvim/init.vim
Y
: Copy from the cursor position to the end of the lineCtrl
s
: Toggle spell check,
z
: Zoom window,
n
: Toggle line number,
va
: Select all lines,
vf
: Select from the current line to the end of line,
vb
: Select from the current line to the first of line,
ya
: Yank all lines,
yf
: Yank from the current line to the end of line,
yb
: Yank from the current line to the first of line
-
Insert Mode
Ctrl
s
: Toggle spell check
-
Command-Line Mode
:W
: Use sudo to save
Custom Snippets β
Markdown β
Shortcut | Output |
---|---|
,b |
Bold |
,s |
|
,i |
italic |
,d |
inline code |
,c |
block code |
,m |
- [ ] |
,p |
![img]() |
,a |
[link]() |
,l |
--- |
,1 |
# H1 |
,2 |
## H2 |
,3 |
### H3 |
,4 |
#### H4 |
,5 |
#### H5 |
,6 |
#### H6 |
,f
: Almost every shortcut above generates a placeholder (<++>),
pressing ,f
will jump the cursor to the placeholder and delete it at the same time.
,w
: The same as ,f
, but it will generate a blank line for you.
NOTE:
All above shortcuts are in the Vim Insert Mode.
Put Your Own Customization β
Add More Plugins β
If you want to use other plugins that not in $HOME/.vimrc
or $HOME/.config/nvim/init.vim
,
you can put them in $HOME/.vimrc.plugins.local
.
For example:
" For distraction-free writing in Vim.
Plug 'junegunn/goyo.vim'
NOTE:
Do not put other configurations in$HOME/.vimrc.plugins.local
, you should put them in$HOME/.vimrc.local
.
Add More Configurations β
You can put your own configurations in $HOME/.vimrc.local
,
it will be soured at the end of $HOME/.vimrc
or $HOME/.config/nvim/init.vim
.
For example:
" *** For plugin 'junegunn/goyo.vim'
" doc: https://github.com/junegunn/goyo.vim
" Usage:
" :Goyo Toggle Goyo
" :Goyo [dimension] Turn on or resize Goyo
" :Goyo! Turn Goyo off
let g:goyo_width = 120 " default: 80
let g:goyo_height = '85%' " default: 85%
let g:goyo_linenr = 1 " default: 0
function! s:goyo_enter()
if executable('tmux') && strlen($TMUX)
silent !tmux set status off
silent !tmux list-panes -F '\#F' | grep -q Z || tmux resize-pane -Z
endif
set noshowmode
set noshowcmd
set scrolloff=999
endfunction
function! s:goyo_leave()
if executable('tmux') && strlen($TMUX)
silent !tmux set status on
silent !tmux list-panes -F '\#F' | grep -q Z && tmux resize-pane -Z
endif
set showmode
set showcmd
set scrolloff=5
endfunction
autocmd! User GoyoEnter nested call <SID>goyo_enter()
autocmd! User GoyoLeave nested call <SID>goyo_leave()
" **********************************
Disable Default Plugins β
If you want to disable some plugins in $HOME/.vimrc
or $HOME/.config/nvim/init.vim
,
you can UnPlug
them in $HOME/.vimrc.plugins.local
.
For example:
" Disable vim hardtime feature.
UnPlug 'takac/vim-hardtime'
Vim/Neovim Plugins β
Code AutoCompletion β
[LS] Language Server
[S] Snippets
[US] UltiSnips
[TN] TabNine
[GOC] Gocode
[NEC] Neco-vim
[A] Around
[B] Buffer
[F] File
M Module
I Interface
S Struct
f func
:C
: Open ~/.vim/coc-settings.json[
/]
g
: Navigate chunks of current buffer[
/]
c
: Navigate conflicts of current buffer,
gd
: Show chunk diff at current position,
gc
: Show commit contains current position<tab>
: Use tab for trigger completion with characters ahead and navigateg
d
/l
: Go to definition position by create new tab wayg
y
: Go to type definitiong
i
: Go to implementation positiong
r
: Show related items in location list, and select one to go toK
: Use K to show documentation in preview window,
rn
: Symbol renamingCtrl
f
/b
: Scroll float windows/popups<Space>
e
: Show all coc extensions<Space>
c
: Show all coc commands<Space>
s
: Show all completion sources of the current file type<Space>
p
: Resume latest coc list
UltiSnips is the ultimate solution for snippets in Vim.
snippets/*
: snippets using snipMate formatUltiSnips/*
: snippets using UltiSnips format
The Vim Script completion source.
Vim completon source for coc.nvim using neco-vim.
Provides insert mode auto-completion for quotes, parens, brackets, etc.
βοΈ License β
This project is under the MIT License. See the LICENSE file for the full license text.