Giter VIP home page Giter VIP logo

vimrc's Introduction

vimrc

vimrc file

GUIDE:

  • git clone [email protected]:nguyenduyta/vimrc.git
  • cp -r vimrc/.vim ~/
  • cp vimrc/.vimrc ~/

Vim using guide

Movement (in command mode only)

  • h move left 1 char (can be multipled)
  • j move down 1 line (can be multipled)
  • k move up 1 line (can be multipled)
  • l move right 1 line (can be multipled)
  • Ctrl+u move up a paragraph (like page up)
  • Ctrl+d move down a paragraph (like page down)
  • w move forward one word (can be multipled)
  • b move backward one word (can be multipled)
  • e move to the end of current word (can be multipled)
  • 0 move to first character of this line
  • ^ move to first non-blank character of this line
  • $ move to last char of this line
  • :0 move to first line of file
  • gg same as :0
  • :$ move to last line of file
  • G same as :$
  • 4G go to line number 4

Command

in general

  • i change to insert mode
  • a append - change to insert mode from the next column
  • o append a new line below current line and change to insert mode
  • O append a new line above current line and change to insert mode
  • ESC exit insert mode
  • u undo (can be multipled)
  • Ctrl+r redo
  • :!terminal_command execute terminal_command in console (ex. :!pwd)

with file and windows

  • :q quit current file
  • :w save current file
  • :q! quit current file without saving
  • :wq save and quit current file
  • ZZ same as :wq
  • :qa quit all opening file
  • :wqa save&quit all opening file
  • :wq save all opening file
  • :e path_to_file_without_braces edit this file
  • :sp path_to_file_without_braces split windows to edit this file
  • :vs path_to_file_without_braces vertical split windows to edit this file
  • Ctrl+w h/j/k/l/movement_keys move cursor between windows

text and blocks editing

  • x cut char (can be multipled)
  • c change char
  • cw change word (can be multipled)
  • s subtitude char (can be multipled)
  • r replace char (can be multipled)
  • dd cut current line (can be multipled)
  • dw cut 2 words (can be multipled)
  • dG cut till the end of this file
  • D cut from cursor position till the end of this line
  • p paste after cursor
  • P paste before cursor
  • yy yank this line (can be multipled)
  • yw yank 2 words (can be multipled)
  • . repeat previous command
  • /text search for "text" in this file
  • n next search result
  • :s/text1/text2 replaces the first instance of text1 with text2
  • :%s/text1/text2 replaces all instances of text1 with text2

vimrc's People

Contributors

nguyenduyta avatar

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.