Git Product home page Git Product logo

cool_vim_commands's Introduction

Cool Commands

MVP = Most Valuable ... Player?

HM = Honourable Mention

ci, di = change or delete inside either: (MVP 2021)

  • ci( or ci) = inside parentheses
  • di{ or di} = inside braces
  • vi[ or vi] = inside square brackets

:h(any vim command, or keyword) (HM 2020)

All hail the vim manual (and its keyword search)

:sp = opens a new screen (MVP 2020)

gv = retrieve previously highlighted visual-mode selection

<C-d> = go down a buffer (fast j)

<C-u> = go up a buffer (fast k)

cw = delete word on cursor, switch to insert mode

% = go to matching { or }, ( or ), [ or ]

TWO IN ONE: These are commands that can be used two in one:

C = c$ = change whole line

s = cl = delete character on cursor, switch to insert mode

S = ^C = go to the beginning of text, change whole line

I = ^i = go to beginning of text, insert mode

A = $a = go to end of line, insert mode append (MVP 2019)

o = A<CR> = newline below, insert mode

O = ko = newline above, insert mode

FIND AND REPLACE:

:,$s/old/new/gc = find "old" and replace it with "new", from current line, for all matches, asking for confirmation (HM 2019)

:%s/old/new/gc = find "old" and replace it with "new", from beginning of file, for all matches, asking for confirmation

:s/old/new/gc = find "old" and replace it with "new", only current line, for all matches, (c = confirm)

cool_vim_commands's People

Contributors

sumezawa avatar

Stargazers

Miguel Villa Floran avatar  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.