Code Monkey home page Code Monkey logo

dotvim's Introduction

Ian's vim configuration (part of dotfiles).

Installation

./install.sh

Plugins

  • scrooloose/nerdtree - Tree explorer
    • <ctrl>n Toggle show/hide
    • <ctrl>ww Toggle between buffer and tree panes
    • t Open the selected file in a new tab
    • R Refresh the root directory listing
  • ctrlpvim/ctrlp.vim - Fuzzy file, buffer, MRU finder
    • <ctrl>p Open file menu
    • <ctrl>\c Paste from clipboard
    • <ctrl>f Switch modes
  • [SirVer/ultisnips][ultisnipsUrl] - Code snippet manager
  • scrooloose/nerdcommenter - Commenting
    • \cc to comment a line
    • \cu to uncomment a line
  • tpope/vim-surround - Quoting/parenthesizing
    • cs[sorrounding][replacement] Replace enclosing characters
  • [mbbill/undotree][undotreeUrl] - Undo history visualizer
    • :UndotreeToggle
  • junegunn/goyo.vim - Distraction-free writing
    • :Goyo
  • [tpope/vim-fugitive][fugitiveUrl] - Git wrapper
    • :Gstatus Status
    • :Gblame Blame
    • :Gbrowse Open current file on GitHub
    • :Git [command] All git commands
  • Chiel92/vim-autoformat - Code formatting
    • :Autoformat or :Autoformat js
  • plasticboy/vim-markdown
    • ]] Go to next header
    • [[ Go to previous header
  • godlygeek/tabular - Lines up text with tabs
    • :Tabularize /[pattern]
  • [valloric/youcompleteme][ycmUrl] - Code-completion engine
  • vim-airline/vim-airline - Status/tabline
  • vim-scripts/sql.vim--Stinson - Better SQL syntax highlighting
  • fatih/vim-go - Go development plugin

Cheat sheet

Input modes

  • i Insert
  • I Insert at beginning of the current line
  • a Append
  • A Append at the end of the current line
  • :set paste Paste-insert mode

Navigation

Normal mode

  • <LeftArrow> Left
  • <DownArrow> Down
  • <UpArrow> Up
  • <RightArrow> Right
  • W Forward/right word navigation
  • B Backward/left word navigation
  • <Home> or <Fn><LeftArrow> Go to beginning of the line
  • <End> or <Fn><RightArrow> Go to end of the line
  • 123G Go to line 123
  • gf Go to file
  • <ctrl>wgf Go to file in a new tab
  • gd Go to local definition

Undo

  • u Undo
  • <ctrl>r Redo

Selection

  • v Start character selection
  • viw Select inner word
  • <shift>v Start line selection
  • v<shift>(arrow) Select line chunks in the direction of the arrow

Copy/Paste

  • y Copy (yank)
  • p Paste
  • "0p Paste from yank register instead of default register
  • a<space><ctrl-r>" Append, add a space, and paste

Cut/Delete

  • d Cut
  • dd Delete line (or cut in highlight mode)
  • d$ Delete from cursor to end of line

Change

  • c$ Change from cursor to end of line
  • cw Change word

Indenting

  • <ctrl>> Indent
  • <ctrl>< Deindent
  • . Repeat indent/deindent

Lines

  • <enter> New line below cursor
  • o New line below cursor and switch to input mode
  • O New line above cursor and switch to input mode

Tabs

  • t Open NERDTree file in new tab
  • <ctrl>t Open ctrlp or fzf file in new tab
  • gt Go to next tab
  • #gt Go to numbered tab
  • gT Go to previous tab

Buffers (open files)

  • :e (file) Edit a file, if no file is passed, the current file is reloaded
  • :b<tab> Switch between buffers
  • <ctrl>o Jump to previous buffer
  • <ctrl>i Jump to next buffer
  • :ls List buffers
  • :wq Write modifications and quit buffer
  • :q Quit buffer
  • :q! Quit buffer and ignore modifications
  • :qa Quit all buffers

Search

  • :noh Turn off search highlighting
  • :%s/<find>/<replace>/g Find and replace in all lines

Folding

  • za Toggle 1-level fold
  • zA Toggle all-level fold
  • zr Unfold all 1-level
  • zR Unfold all
  • zm Fold all 1-level
  • zM Fold all

Spelling

  • zg Add word to dictionary
  • :set nospell Turn off spell checking

ย 

Created by Ian Walter.

[undotreeUrl]: [fugitiveUrl]: https://github.com/tpope/vim-fugitive [goyoUrl]: [undotreeUrl]: https://github.com/mbbill/undotree

dotvim's People

Contributors

busterbeans avatar ianwalter avatar

Stargazers

 avatar

Watchers

 avatar  avatar

dotvim's Issues

Fix lint issues on save

let g:ale_fix_on_save = 1

and possibly get rid of vim-workspace if it doesnt solve the sessions issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.