nvim ed

...a vim-based text editor!

basic usage ed

leave any mode by ESC ...go into "normal mode"

command mode ed

From general mode type :Some commands:

:q     quit
:q!    quit (ignore changes)
:wq    save + quit
:w     save
:!XXX  run a shell command XXX
:r FFF read a file and insert at cursor
:r!XXX run a shell command and insert the output

TAB can display auto complete

normal mode ed

/     search
n     next
i     edit mode
dd    delete line
yy    copy line
p     paste line
u     undo
Ctrl+r  redo

insert mode ed

Almost like a regular text editor...

plugin managers ed

vim-plug ed

install vim-plug
according to https://github.com/junegunn/vim-plug:
sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs  \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

install a plugin
call plug#begin()
Plug 'itchyny/lightline.vim'
Plug 'preservim/nerdtree'
Plug 'lervag/vimtex'
Plug 'SirVer/ultisnips'
call plug#end()
...

ESC:PlugInstall

this will download and install all requested plugins

vim8 internal ed

...

plugins ed

nerd tree ed

install nerdtree
git clone https://github.com/preservim/nerdtree.git ~/.vim/pack/vendor/start/nerdtree
vim -u NONE -c "helptags ~/.vim/pack/vendor/start/nerdtree/doc" -c q

edit .config/nvim/init.vim
call plug#begin()
Plug 'preservim/nerdtree'
call plug#end()
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif

ESC:PlugInstall

vimtex ed

Plug 'lervag/vimtex'

Categories: Computer