Skip to content

devstefancho/my-ultimate-vim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

my-ultimate-vim

Shortcut Function
<leader>pv netrw(left explorer)
⌘ P ctrlP(bottom explorer)

vifm_netrw_ctrlP

Vim or Neovim

If you use vim, you do setup in ~/.vimrc
For Neovim setup in ~/.config/nvim/init.vim

Path

~/.config/nvim/init.vim
~/.config/vifm/vifmrc

Install vim-plug to use PlugInstall

  1. 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
  1. go to vim and enter below command in vim command

:PlugInstall

.zshrc alias (I use iterm2)

# 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'

Frequent use command in vim

: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)

Color Schemes for vifm

Color schemes

Caution!

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*

custom snippets

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 js.snippets

React comment

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

Shortcuts for frequent usage

Function Key Mode
Emmet ,, normal

Iterm2 key binding

Key Combintaion Action
⌘ / Send:"++"
⌘ p Send:":CtrlP\n"

Reference setup (I got setup from these guys, Thanks!!)

Ben Awad
ThePrimeagen
MAKC
DistroTube
TheFrugalComputerGuy
BrodieRobertson

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published