Skip to content

Instantly share code, notes, and snippets.

@Reactiver
Last active January 3, 2020 14:41
Show Gist options
  • Save Reactiver/85991a4546d5508d3b405bad453b705f to your computer and use it in GitHub Desktop.
Save Reactiver/85991a4546d5508d3b405bad453b705f to your computer and use it in GitHub Desktop.
vim configuration
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/nerdtree', {'on' : 'NERDTreeToogle'}
"colorscheme"
Plug 'morhetz/gruvbox'
call plug#end()
syntax on
colorscheme gruvbox
set background=dark
set number
set expandtab
set tabstop=2
set hlsearch
set incsearch
set clipboard=unnamedplus

Tips

v - visual mode (for copy) y - yank (copy)

  • copy selected part: visually select text(type v or V in normal mode) and type :w !pbcopy
  • copy the whole file :%w !pbcopy
  • paste from the clipboard :r !pbpaste

On most Linux Distros, you can substitute:

  • pbcopy above with xclip -i -sel c or xsel -i -b
  • pbpaste using xclip -o -sel -c or xsel -o -b -- Note: In case neither of these tools (xsel and xclip) are preinstalled on your distro, you can probably find them in the repos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment