infidel_env/.vimrc

117 lines
3.4 KiB
VimL
Raw Normal View History

2022-02-02 11:18:50 -05:00
" config.vim
"
call plug#begin('~/.vim/plugged')
" Essentials
2022-02-02 11:18:50 -05:00
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',
" 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' }
2022-02-02 11:18:50 -05:00
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
2022-02-02 11:18:50 -05:00
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
2022-02-02 11:18:50 -05:00
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
2022-02-02 11:18:50 -05:00
map <C-k><C-k> :NERDTreeToggle<cr> " Use Ctrl-P to open the fuzzy file opener
nnoremap <C-p> :Files<cr>
2022-04-08 03:56:03 -04:00
"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
"Completor Tab
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
inoremap <expr> <cr> pumvisible() ? "\<C-y>" : "\<cr>"
"Goyo Setup
"Call Limelight every time enter Goyo
autocmd! User GoyoEnter Limelight
autocmd! User GoyoLeave Limelight!
" Toggle Goyo
nmap <F8> : Goyo<cr>