Shortcut | Function |
---|---|
<leader>pv | netrw(left explorer) |
⌘ P | ctrlP(bottom explorer) |
If you use vim, you do setup in ~/.vimrc
For Neovim setup in ~/.config/nvim/init.vim
~/.config/nvim/init.vim
~/.config/vifm/vifmrc
- First enter below command in your terminal
Vim
-Unix
curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
You can automate the process by putting the command in your Vim configuration file as suggested here.
-Windows (PowerShell)
iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
ni $HOME/vimfiles/autoload/plug.vim -Force
Neovim
-Unix, Linux
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'
-Linux (Flatpak)
curl -fLo ~/.var/app/io.neovim.nvim/data/nvim/site/autoload/plug.vim \
https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
-Windows (PowerShell)
iwr -useb https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim |`
ni "$env:LOCALAPPDATA/nvim-data/site/autoload/plug.vim" -Force
- go to vim and enter below command in vim command
:PlugInstall
# Alias
alias v='nvim'
alias vi='nvim'
alias vim='nvim'
alias vconfig='vim ~/.config/nvim/init.vim'
alias vfconfig='vim ~/.config/vifm/vifmrc'
alias zconfig='vim ~/.zshrc'
alias vf='vifm'
alias vw='vim ~/vimwiki/index.wiki'
:CocCommand snippets.editSnippets
for your custom snippets (auto-complete)
:CocList snippets
list all your custom snippets
:r .config/nvim/init.vim
copy your .vimrc to init.vim (useful when changing editor Vim to Neovim)
You must know what .snippets are (coc-snippets)
each .snippets file effects on file name
for example)
javascript.snippets works only for .js file
path(for Mac) ~/.config/coc/ultisnips/
javascript.snippets
// snippets for .js
vim.snippets
// snippets for .vim*
customizing your snippets
:CocCommand snippets.editSnippets
then open explorer with netrw (in my setting, shortcut is <leader>pv
, is spacebar)
Edit javascript.snippets for javascript file
I use Plugin NerdCommenter
For React user, need to switch from "left and right" to the "leftalt and rightalt" (as we need to comment html_tag out)
let g:NERDCustomDelimiters={
\ 'javascript': { 'left': '//', 'right': '', 'leftAlt': '{/*', 'rightAlt': '*/}' },
\}
How to switch delimeters
Hotkey | link |
---|---|
<Leader>ca | NERDCommenterAltDelims |
:let g:NERDCustomDelimiters
Switches to the alternative set of delimiters.
(you can find this in nerdcommenter doc)
This issue is useful nerdcommenter#280
Function | Key | Mode |
---|---|---|
Emmet | ,, |
normal |
Key Combintaion | Action |
---|---|
⌘ / | Send:"++" |
⌘ p | Send:":CtrlP\n" |
Ben Awad
ThePrimeagen
MAKC
DistroTube
TheFrugalComputerGuy
BrodieRobertson