GithubHelp home page GithubHelp logo

nvim's Introduction

Instalation

sudo apt install neovim

Unistall configurations

rm -rf ~/.config/nvim rm -rf ~/.local/share/nvim rm -rf ~/.cache/nvim

Ubuntu Stable

sudo add-apt-repository ppa:neovim-ppa/stable sudo apt-get update

Commands

  • nvim {name_file} open the file and if it does'nt exist create a blank one.
  • :q quit vim
  • :q! quit and dismiss all the changes
  • :!{command} execute a terminal command
  • :wq Write and quit
  • :bd Quit buffer

Modes

  • : starts a command (normal mode)
  • ESC get out of the last mode
  • 'i` enters the insert mode, you can insert text before the cursor
  • `a' insert mode after the cursor
  • o insert mode on a new line
  • I insert mode beginning of the line
  • A insert mode end of the line
  • O insert mode new line above
  • v visual mode
  • V visual line mode (select by lines)
  • Ctrl + v visial block mode
  • d delete selection
  • dd delete whole line
  • D delete from the cursor trhough the end
  • y copy
  • yy copy the whole line
  • p paste
  • P paste above the line or before the cursor
  • c change
  • cc Insert mode to change all of the line
  • r Replace mode

Key bidings

  • u In normal mode, undid the action
  • {number}u normal mode, number of undos back
  • ctrl+r normal mode, redo
  • {number}ctrl+r nomal mode, number of redos
  • w jump to the next word
  • W jump to the next word ignoring special characters
  • b jump backwards
  • B jump backwards ignoring special characters
  • dw delete next word
  • {number}dw delete number of words
  • {number}db delete number of words backwards
  • diw delete in a word
  • ciw change in a word
  • d0 delete every thing to the start
  • d$ delete every thing to the end
  • yiw yank in a word, copy the word

Useful in codding

  • ci{simbol} change innter text of the simbol
  • . repeat the last command that you execute

Move

  • JKLH optional arrows
  • arrow number move the cursor number of times on the direction of the arrow
  • e end of the word
  • 0 Begin of the line
  • $ end of the line
  • % jump to the end/start of a simbol (){}....
  • t{simbol} jump position before the simbol
  • T{simbol} jump backwards before the simbol
  • f{simbol} (find) jump to position of the simbol
  • F{simbol} jump backwards to position of the simbol
  • gg Jump begining of the file
  • G jump to the end of the file
  • {number}G jump to the number line
  • :{number} jump to the number line

Window

  • :vsplit Vertical split
  • :split Horizontal split

Intermediate features

Indentation

  • >> Indentation to the rigth
  • << Indentation to the left
  • == Automatic indentation
  • gg=G Automatic indentation from the begining through the end

Searching

  • :/{word} search word
  • n next word
  • N backward jump
  • # move up with the word selected (visual mode)
  • * move down with the word selected (visual mode)

Replacing

  • :%s/{word}/{newWord}/g replace all the occurences of word to newWord
  • :s/{word}/{newWord}/g replace occurences of word on a selected text

Marking locations

  • m{caracter} mark a place on the code with the caracter alias
  • '{caracter} go to the place
  • zz center the code

Macros and registers

  • :reg see the registeris
  • "{registerNumber}p choose a register and paste it
  • {registerNumber}yy:reg overwrite register on register number with new command
  • q{caracter} record a macro -> q quit macro recording`
  • @{caracter} execute the macro

settings permanent create a file at vim ~/.config/nvim/init.lua

create folder for configurations on lua/{user}

Links

nvim's People

Contributors

cdlavacudeg avatar

Watchers

 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.