Update vimrc
This commit is contained in:
parent
93cbaf6a69
commit
da4ff25316
@ -1,22 +1,63 @@
|
|||||||
if ! filereadable(system('echo -n "${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim"'))
|
set breakindent
|
||||||
silent !mkdir -p ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/
|
set clipboard=unnamedplus
|
||||||
silent !curl "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim" > ${XDG_CONFIG_HOME:-$HOME/.config}/nvim/autoload/plug.vim
|
set encoding=utf-8
|
||||||
|
set expandtab
|
||||||
|
set hidden
|
||||||
|
set ignorecase
|
||||||
|
set nocompatible
|
||||||
|
set nohlsearch
|
||||||
|
set noshowmode
|
||||||
|
set relativenumber
|
||||||
|
set shiftwidth=2
|
||||||
|
set smartcase
|
||||||
|
set smarttab
|
||||||
|
set softtabstop=2
|
||||||
|
set synmaxcol=150
|
||||||
|
set tabstop=4
|
||||||
|
set undofile
|
||||||
|
set wildmenu
|
||||||
|
|
||||||
|
filetype plugin on
|
||||||
|
scriptencoding utf-8
|
||||||
|
syntax on
|
||||||
|
|
||||||
|
" General key mappings
|
||||||
|
map <Up> <Nop>
|
||||||
|
map <Down> <Nop>
|
||||||
|
map <Left> <Nop>
|
||||||
|
map <Right> <Nop>
|
||||||
|
|
||||||
|
no <C-k> <C-w>k
|
||||||
|
no <C-j> <C-w>j
|
||||||
|
no <C-h> <C-w>h
|
||||||
|
no <C-l> <C-w>l
|
||||||
|
|
||||||
|
no ; :
|
||||||
|
|
||||||
|
augroup General
|
||||||
|
au!
|
||||||
|
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
||||||
|
augroup END
|
||||||
|
|
||||||
|
if empty(glob($XDG_CONFIG_HOME . '/nvim/autoload/plug.vim'))
|
||||||
|
silent !curl -fLo $XDG_CONFIG_HOME/nvim/autoload/plug.vim --create-dirs
|
||||||
|
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
|
||||||
|
|
||||||
|
augroup Plug
|
||||||
|
au!
|
||||||
autocmd VimEnter * PlugInstall
|
autocmd VimEnter * PlugInstall
|
||||||
|
augroup END
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call plug#begin(system('echo -n "$XDG_DATA_HOME:-$HOME/.local/share}/nvim/plugged"'))
|
call plug#begin($XDG_DATA_HOME . '/nvim/plugged')
|
||||||
|
|
||||||
|
Plug 'itchyny/lightline.vim'
|
||||||
|
Plug 'mbbill/undotree'
|
||||||
|
nn <silent> <Leader>u :UndotreeToggle <BAR> :UndotreeFocus<CR>
|
||||||
|
|
||||||
|
Plug 'sheerun/vim-polyglot'
|
||||||
|
Plug 'tpope/vim-commentary'
|
||||||
|
Plug 'tpope/vim-fugitive'
|
||||||
|
Plug 'tpope/vim-surround'
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" Basics
|
|
||||||
set nocompatible
|
|
||||||
filetype plugin on
|
|
||||||
syntax on
|
|
||||||
set encoding=utf-8
|
|
||||||
set number relativenumber
|
|
||||||
set nohlsearch
|
|
||||||
" Disable automatic commenting on newline
|
|
||||||
autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o
|
|
||||||
" Open split at bottom and right
|
|
||||||
set splitbelow splitright
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user