2c3e3ecdf4
* update installation sequences * Added several CoC extensions
130 lines
3.6 KiB
VimL
130 lines
3.6 KiB
VimL
" infidel
|
|
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
" Essentials
|
|
Plug 'tpope/vim-sensible' " Sensible defaults
|
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
|
Plug 'junegunn/vim-easy-align'
|
|
Plug 'junegunn/fzf.vim'
|
|
Plug 'junegunn/goyo.vim'
|
|
Plug 'junegunn/limelight.vim'
|
|
|
|
" Auto Completes
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'}
|
|
" Plug 'neoclide/coc.nvim',
|
|
" Plug 'sheerun/vim-polyglot'
|
|
" Plug 'maralla/completor.vim'
|
|
"
|
|
|
|
" Color Schemes
|
|
Plug 'rakr/vim-two-firewatch'
|
|
Plug 'lifepillar/vim-gruvbox8'
|
|
Plug 'drewtempelmeyer/palenight.vim'
|
|
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
|
|
|
call plug#end()
|
|
|
|
let mapleader = ","
|
|
syntax on
|
|
set re=1
|
|
set nocompatible
|
|
|
|
set number " Show numbers on the left
|
|
set hlsearch " Highlight search results
|
|
set ignorecase " Search ingnoring case
|
|
set smartcase " Do not ignore case if the search patter has uppercase set noerrorbells " I hate bells set belloff=esc
|
|
set tabstop=4 " Tab size of 4 spaces
|
|
set softtabstop=4 " On insert use 4 spaces for tab
|
|
set shiftwidth=4
|
|
set expandtab " Use apropiate number of spaces
|
|
set nowrap " Wrapping sucks (except on markdown)
|
|
autocmd BufRead,BufNewFile *.md,*.txt setlocal wrap " DO wrap on markdown files set noswapfile " Do not leve any backup files
|
|
set mouse=a " Enable mouse on all modes
|
|
set clipboard=unnamed,unnamedplus " Use the OS clipboard
|
|
set showmatch
|
|
"set termguicolors
|
|
set t_Co=256
|
|
set splitright splitbelow
|
|
set list lcs=tab:\¦\ "(here is a space)
|
|
let &t_SI = "\e[6 q" " Make cursor a line in insert
|
|
let &t_EI = "\e[2 q" " Make cursor a line in insert
|
|
|
|
" Keep VisualMode after indent with > or <
|
|
vmap < <gv
|
|
vmap > >gv
|
|
"
|
|
" Move Visual blocks with J an K
|
|
vnoremap J :m '>+1<CR>gv=gv
|
|
vnoremap K :m '<-2<CR>gv=gv
|
|
|
|
" Autocomand to remember las editing position
|
|
augroup vimrc-remember-cursor-position
|
|
autocmd!
|
|
autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g`\"" | endif
|
|
augroup END
|
|
|
|
set background=dark
|
|
colo gruvbox8_hard
|
|
|
|
map <C-k><C-k> :NERDTreeToggle<cr> " Use Ctrl-P to open the fuzzy file opener
|
|
nnoremap <C-p> :Files<cr>
|
|
|
|
"Easy Align
|
|
" Start interactive EasyAlign in visual mode (e.g. vipga)
|
|
xmap ga <Plug>(EasyAlign)
|
|
|
|
" Start interactive EasyAlign for a motion/text object (e.g. gaip)
|
|
nmap ga <Plug>(EasyAlign)
|
|
|
|
" Lightlime Setup
|
|
" Lighlime Shortcut
|
|
nmap <Leader>l :Limelight!!<cr>
|
|
|
|
" Color name (:help cterm-colors) or ANSI code
|
|
let g:limelight_conceal_ctermfg = 'gray'
|
|
let g:limelight_conceal_ctermfg = 240
|
|
|
|
" Color name (:help gui-colors) or RGB color
|
|
let g:limelight_conceal_guifg = 'DarkGray'
|
|
let g:limelight_conceal_guifg = '#777777'
|
|
|
|
" Default: 0.5
|
|
let g:limelight_default_coefficient = 0.7
|
|
|
|
" Number of preceding/following paragraphs to include (default: 0)
|
|
" let g:limelight_paragraph_span = 1
|
|
|
|
" Beginning/end of paragraph
|
|
" When there's no empty line between the paragraphs
|
|
" and each paragraph starts with indentation
|
|
" let g:limelight_bop = '^\s'
|
|
" let g:limelight_eop = '\ze\n^\s'
|
|
|
|
" Highlighting priority (default: 10)
|
|
" Set it to -1 not to overrule hlsearch
|
|
let g:limelight_priority = -1
|
|
|
|
"CoC
|
|
let g:coc_disable_startup_warning = 1
|
|
"Tab Navigation
|
|
inoremap <silent><expr> <TAB>
|
|
\ pumvisible() ? "\<C-n>" :
|
|
\ <SID>check_back_space() ? "\<TAB>" :
|
|
\ coc#refresh()
|
|
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"
|
|
|
|
"Coc vimlsp Highlighting
|
|
let g:markdown_fenced_languages = [
|
|
\ 'vim',
|
|
\ 'help'
|
|
\]
|
|
|
|
|
|
"Goyo Setup
|
|
"Call Limelight every time enter Goyo
|
|
autocmd! User GoyoEnter Limelight
|
|
autocmd! User GoyoLeave Limelight!
|
|
" Toggle Goyo
|
|
nmap <F8> : Goyo<cr>
|