Skip to content

Instantly share code, notes, and snippets.

@neninja
Last active May 7, 2018 11:56
Show Gist options
  • Save neninja/78a0ad7dc57f216dacc92e9b95cc9b7e to your computer and use it in GitHub Desktop.
Save neninja/78a0ad7dc57f216dacc92e9b95cc9b7e to your computer and use it in GitHub Desktop.

https://woliveiras.com.br/vimparanoobs/

https://www.youtube.com/watch?v=kZDT10nFiTY&t=1674s

Comandos

:q / quit
:q! / force quit
:w / write
:w <name> / save as
:wq / write and quit
u / undo
x / delete char
yw / copy word
yy / copy line
dd / cut line
p / paste
yy / copy line
:Vex / vertical folders
ctrl w w / trocar tela split
% / new file in Vex
:!mkdir / new folder in Vex
gg / beginning file
G / ending file
gg"+yG / copy all
:PlugInstall / plugin installer
/<text> / Search a text [n for next word]
%s/old/new/g / all old for new
+ - / up and down
2k ou 2[seta-cima] / up 2 lines
2j ou 2[seta-baixo] / down 2 lines
v / visual mode
y / copy on visual mode

Instalação e pré-configuração

instalação

sudo apt-get install neovim
cd .config
mkdir nvim
cd nvim
git init

curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

init.vim

cd .config/nvim
nvim init.vim
let g:UltiSnipsExpandTrigger="<tab>"
let g:UltiSnipsJumpForwardTrigger="<c-b>"
let g:UltiSnipsJumpBackwardTrigger="<c-z>"
let g:UltiSnipsEditSplit="vertical"

let g:UltiSnipsEditSplit="vertical"
let g:UltiSnipsSnippetsDir = '~/.config/nvim/UltiSnips'

let g:lightline = {
      \ 'colorscheme': 'onedark',
      \ 'active': {
      \   'left': [ [ 'mode', 'paste' ],
      \             [ 'gitbranch', 'readonly', 'filename', 'modified' ] ]
      \ },
      \ 'component_function': {
      \   'gitbranch': 'fugitive#head'
      \ },
      \ }

call plug#begin()
Plug 'vitchyny/im-gitbranch'
Plug 'itchyny/lightline.vim'
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
Plug 'joshdick/onedark.vim'
Plug 'sheerun/vim-polyglot'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'junegunn/fzf.vim'
Plug 'roxma/nvim-completion-manager'
Plug 'w0rp/ale'
Plug 'cohama/lexima.vim'
call plug#end()

colorscheme onedark

set hidden
set number
set relativenumber
set termguicolors
set mouse=a
set inccommand=split
set clipboard=unnamed
set expandtab
set shiftwidth=2

set showcmd
set cursorline
set hlsearch
set ignorecase
set autoindent

"let mapleader="\<space>"
"nnoremap <leader>; A;<esc>
"nnoremap <leader>sv :source $MYVIMRC<cr>
nnoremap <c-p> :Files<cr>
"nnoremap <c-f> :Ag<space>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment