64 lines
2.0 KiB
VimL
64 lines
2.0 KiB
VimL
" config.vim
|
|
"
|
|
call plug#begin('~/.vim/plugged')
|
|
|
|
Plug 'tpope/vim-sensible' " Sensible defaults
|
|
Plug 'drewtempelmeyer/palenight.vim'
|
|
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
|
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
|
Plug 'junegunn/fzf.vim'
|
|
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
|
Plug 'neoclide/coc.nvim', {'branch': 'release'} " Intelisense
|
|
Plug 'sheerun/vim-polyglot'
|
|
Plug 'lifepillar/vim-gruvbox8'
|
|
|
|
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 default
|
|
|
|
map <C-k><C-k> :NERDTreeToggle<cr> " Use Ctrl-P to open the fuzzy file opener
|
|
nnoremap <C-p> :Files<cr>
|