Skip to content

Instantly share code, notes, and snippets.

@arcollector
Last active February 17, 2021 15:00
Show Gist options
  • Save arcollector/4a0ffc2cc99fe609bcffa7647a5c2b7d to your computer and use it in GitHub Desktop.
Save arcollector/4a0ffc2cc99fe609bcffa7647a5c2b7d to your computer and use it in GitHub Desktop.
read comment below!!!!
call plug#begin('~/.vim/plugged')
Plug 'scrooloose/syntastic'
Plug 'scrooloose/nerdtree'
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'airblade/vim-gitgutter'
Plug 'ryanoasis/vim-devicons'
Plug 'kien/rainbow_parentheses.vim'
Plug 'bling/vim-bufferline'
Plug 'severin-lemaignan/vim-minimap'
Plug 'yuezk/vim-js'
Plug 'HerringtonDarkholme/yats.vim'
Plug 'maxmellon/vim-jsx-pretty'
Plug 'morhetz/gruvbox'
if has('nvim')
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugs' }
else
Plug 'Shougo/deoplete.nvim'
Plug 'roxma/nvim-yarp'
Plug 'roxma/vim-hug-neovim-rpc'
endif
call plug#end()
let g:jsx_ext_required = 0
let g:airline_powerline_fonts = 1
let g:javascript_Plug_flow = 1
let g:deoplete#enable_at_startup = 1
let g:Hexokinase_highlighters = ['backgroundfull']
au VimEnter * RainbowParenthesesToggle
au Syntax * RainbowParenthesesLoadRound
au Syntax * RainbowParenthesesLoadSquare
au Syntax * RainbowParenthesesLoadBraces
if strftime("%H") < 20 && strftime("%H") > 8
let g:airline_theme = 'cobalt2'
color cake
color autumnleaf
set background=dark
color gruvbox
set background=light
color kalisi
else
color vertLaiton
set background=light
color calmar256-light
endif
set cursorline
set expandtab
set modelines=0
set shiftwidth=2
set clipboard=unnamed
set synmaxcol=128
set encoding=utf-8
set tabstop=2
set nowrap
set number
set expandtab
set nowritebackup
set noswapfile
set nobackup
set hlsearch
set ignorecase
set smartcase
set laststatus=2
set mouse=a
set listchars=tab:→\ ,trail:•,extends:»,precedes:«,eol:↩
hi NonText ctermfg=7
set nocindent
set foldmethod=indent
set foldnestmax=10
set foldlevel=2
set foldenable
set ignorecase
set backspace=indent,eol,start
nmap <S-Up> v<Up>
nmap <S-Down> v<Down>
nmap <S-Left> v<Left>
nmap <S-Right> v<Right>
vmap <S-Up> <Up>
vmap <S-Down> <Down>
vmap <S-Left> <Left>
vmap <S-Right> <Right>
imap <S-Up> <esc>v<Up>
vmap <S-Up> <Up>
imap <S-Down> <esc>v<Down>
vmap <S-Down> <Down>
imap <S-Left> <esc>v<Left>
vmap <S-Left> <Left>
imap <S-Right> <esc>v<Right>
vmap <S-Right> <Right>
imap <s-End> <esc>v$<End>
vmap <s-End> $<End>
nmap <s-End> v$<End>
imap <s-Home> <esc>v0
vmap <s-Home> 0
nmap <s-Home> v0
nnoremap <c-s> :w<CR>
inoremap <c-s> <Esc>:w<CR>
vnoremap <c-s> <Esc>:w<CR>
nmap <c-f> :noh<CR>
imap <c-f> <esc>:noh<cr>i
nmap . i.
nmap , i,
map q <Nop>
nmap <Backspace> i<Backspace>
vmap <Backspace> <Esc>d
nmap <Tab> i<Tab>
nmap <CR> i<CR>
nmap <c-l> :set list!<CR>
imap <c-l> <Esc>:set list!<CR>i
nmap <s-PageDown> <Nop>
imap <s-PageDown> <Nop>
vmap <s-PageDown> <Nop>
nmap <s-PageUp> <Nop>
imap <s-PageUp> <Nop>
vmap <s-PageUp> <Nop>
imap <c-g> <esc>:
nmap <c-g> :
imap <c-d> <esc>dd<up>ppA
nmap <c-d> dd<up>pp
nmap <space> i<space>
vmap < <gv
vmap > >gv
vmap <tab> >
vmap <s-tab> <
nnoremap ; :
vnoremap ; <esc>;
nmap <c-a> ggVG
nmap <PageDown> 10j
vmap <PageDown> 10j
imap <PageDown> <esc>10ji
nmap <PageUp> 10k
vmap <PageUp> 10k
imap <PageUp> <esc>10ki
nmap + <nop>
nmap - <nop>
vmap + <nop>
vmap - <nop>
imap <c-home> <esc>:bn!<cr>i
nmap <c-home> :bn!<cr>
imap <c-end> <esc>:bp!<cr>i
nmap <c-end> :bp!<cr>
nmap <c-w> <c-w><c-w>
imap <c-w> <esc><c-w>
imap <c-q> <esc>:bd<cr>
nmap <c-q> :bd<cr>
nmap <c-h> :%s/
imap <c-h> <esc>:%s/
imap <insert> <nop>
noremap yy "kyy
noremap YY "Kyy
inoremap <expr> <C-Space> pumvisible() \|\| &omnifunc == '' ?
\ "\<lt>C-n>" :
\ "\<lt>C-x>\<lt>C-o><c-r>=pumvisible() ?" .
\ "\"\\<lt>c-n>\\<lt>c-p>\\<lt>c-n>\" :" .
\ "\" \\<lt>bs>\\<lt>C-n>\"\<CR>"
imap <C-@> <C-Space>
vmap <C-c> y:call system("xclip -i -selection clipboard", getreg("\""))<CR>:call system("xclip -i", getreg("\""))<CR>
nmap <C-v> :call setreg("\"",system("xclip -o -selection clipboard"))<CR>p
command -nargs=0 Quit :qa!
let g:NERDTreeWinSize=20
let NERDTreeShowHidden=1
map <C-\> :NERDTreeToggle<CR>
imap <C-\> <esc>:NERDTreeToggle<CR>a
filetype indent off
augroup Format-Options
autocmd!
autocmd BufEnter * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
augroup END
autocmd Filetype make setlocal nofoldenable
syntax on
@arcollector
Copy link
Author

arcollector commented Jan 26, 2017

install colors

mkdir -p ~/.vim/colors
wget https://raw.githubusercontent.com/drzaal/vert-laiton/master/colors/vertLaiton.vim -O ~/.vim/colors/vertLaiton.vim
wget https://raw.githubusercontent.com/GGalizzi/cake-vim/master/colors/cake.vim -O ~/.vim/colors/cake.vim
wget https://raw.githubusercontent.com/isaacs/.vim/master/colors-all/autumnleaf.vim  -O ~/.vim/colors/autumnleaf.vim
wget https://raw.githubusercontent.com/isaacs/.vim/master/colors-all/calmar256-light.vim  -O ~/.vim/colors/calmar256-light.vim
wget https://raw.githubusercontent.com/freeo/vim-kalisi/master/colors/kalisi.vim -O ~/.vim/colors/kalisi.vim

install vim-plug

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

open vim and run this command to install all plugins

:PlugInstall

also you need xclip program:

sudo apt-get install xclip

Also airline need a font with icons support, run this command

cd
git clone [email protected]:ryanoasis/nerd-fonts.git
cd nerd-fonts
./install.sh
cd
rm -rf nerd-fonts

Then in the terminal change the font terminal by selecting a font with NERD named on it

@arcollector
Copy link
Author

arcollector commented Jun 7, 2020

to install vim with all features enabled, note that will also installing python3.6

sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
sudo apt-get install -y liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libatk1.0-dev libx11-dev libxpm-dev libxt-dev python3.6 python3-dev
sudo rm -rf /usr/local/share/vim /usr/bin/vim
git clone https://github.com/vim/vim ~/vimtemp
cd ~/vimtemp
git pull && git fetch
cd src
make distclean-am
make clean
make distclean
cd ..
./configure --enable-multibyte --enable-perlinterp=dynamic --enable-rubyinterp=dynamic --enable-pythoninterp=dynamic --enable-python3interp --enable-luainterp --with-luajit --enable-cscope --enable-gui=auto --with-features=huge --with-x --enable-fontset --enable-largefile --disable-netbeans --with-compiledby="yourname" --enable-fail-if-missing
make && sudo make install

then we need

sudo apt-get install python3-setuptools python3-pip
pip3 install wheel  pynvim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment