Skip to content

zhhz/vim-settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

  1. clone the repo
  2. $ vimsettings install
  3. install air-line fonts
  4. brew install ctags
  5. $ ctags -R . NOTE: in your project folder

NOTE: $brew install ctags

  1. the ctags config
  2. good reference: https://bitboxer.de/2016/11/13/vim-for-elixir/
  3. sometime you have to give the full path $ /usr/local/bin/ctags -R .

^] Jump to definition ^t Jump back from definition ^W } Preview definition g] See all definitions

In edit mode ^p / ^n - complete base on previous/next content

^x^] - code, auto complete (need ctag running) ^x^f - filename completion ^x^[]

^o / ^i / ^t - jump back and force

vim-settings

A quick settings for vim

  • F2 - toggle NERDTree SHIFT-O - open all the folders

  • F3 - toggle zoom window

  • F4 - screen shell vertical

  • F5 - toggle paste mode

  • F6 - toggle column

  • F7 - insert current date and time

  • ,bd - delete current buffer

  • ,be - buffer explorer

  • ,bs - horizen split open

  • ,bv - vertical split open

  • ,rts - remove trailing space

  • :sp - horizon split

  • :vs - vertical split

  • C-W c or Ctrl + c - close a window

  • CTRL + h/j/k/l - move between windows

" not work on iterm2

  • META + h/j/k/l - resize windows with the mata/option key

  • CTRL + n - stack current and open a new window and focus on it

  • CTRL + space - focus on current window

  • ii - in edit mode, this is mapped to ESC

  • ,ig - toggle indent

  • ,y - yangk ring

  • " teris game

  • ,te

  • " split a bash console

  • ,cb

  • " surround

  • ,#",)([{

  • "Go to last edit location with ,.

  • ,.

  • " the insert mode the first quote will autoclose so you'll get 'foo' and hitting will put the cursor right after the quote

  • Ctrl-a

  • " show git diff gugger

  • ,g

  • " format json

  • ,fj

  • " easy motion

  • ,,f

  • " visual find and replace

  • ,fr

    • normal model
    • range
  • " default formating

  • =G

ctrl-p

Full path fuzzy file, buffer, mru, tag, ... finder for Vim.

Once CtrlP is open:
  • Press <F5> to purge the cache for the current directory to get new files, remove deleted files and apply new ignore options.
  • Press <c-f> and <c-b> to cycle between modes.
  • Press <c-d> to switch to filename only search instead of full path.
  • Press <c-r> to switch to regexp mode.
  • Use <c-j>, <c-k> or the arrow keys to navigate the result list.
  • Use <c-t> or <c-v>, <c-x> to open the selected entry in a new tab or in a new split.
  • Use <c-n>, <c-p> to select the next/previous string in the prompt's history.
  • Use <c-y> to create a new file and its parent directories.
  • Use <c-z> to mark/unmark multiple files and <c-o> to open them.>>>'

vim -u NONE " this will start vim without vimrc, very useful for debuging to see if you vimrc messed up vim --noplugin " same as above

" surounding plugin csw" - adds "" to current word cs'" - change current word's surounding from ' to "

" jumping around tags or definitions Ctrl-]

" ack integration :Ack 'patter'

" zoom window o " toggle or toggle

" quick buffer switch ,z/,x go next or back buffer

" tabuluar plugin :Tab/: :Tab/:\zs

About

A quick settings for vim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published