init.vim (2511B)
1 " >source % (refrescar a configuracion) 2 syntax on 3 4 :set number 5 ":set rnu 6 :set numberwidth=1 7 8 :set mouse=a 9 :set noerrorbells 10 11 " Tabulacions 12 :set sw=4 13 :set expandtab 14 15 " Indentacions 16 :set smartindent 17 18 :set nowrap 19 :set noswapfile 20 :set nobackup 21 :set incsearch 22 :set ignorecase 23 :set clipboard+=unnamedplus " Senon vai -> instala xclip 24 :set encoding=utf-8 25 :set cursorline 26 :set termguicolors 27 :set colorcolumn=120 28 :highlight ColoColumn ctermbg=0 guibg=lightgrey 29 30 31 " Plugins 32 call plug#begin('~/.local/share/nvim/plugged') 33 " Instalar plugins: :PlugInstall 34 "https://github.com/iamcco/markdown-preview.nvim 35 Plug 'itchyny/lightline.vim' 36 Plug 'tpope/vim-surround' " Para engadir/eliminar/cambiar parenteses 37 Plug 'airblade/vim-gitgutter' " diffs de git 38 Plug 'tomtom/tcomment_vim' " comentarios 39 Plug 'orlp/vim-bunlink' " pechar ventanas sen perder as separacions 40 Plug 'vim-autoformat/vim-autoformat' 41 Plug 'editorconfig/editorconfig-vim' 42 Plug 'neoclide/coc.nvim', {'branch': 'release'} 43 Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && yarn install' } 44 Plug 'rrethy/vim-hexokinase', { 'do': 'make hexokinase' } " css cores 45 " Temas 46 Plug 'morhetz/gruvbox' 47 Plug 'ayu-theme/ayu-vim' 48 Plug 'joshdick/onedark.vim' 49 50 call plug#end() 51 52 " Establecer tecla lider (espazo) 53 let mapleader=" " 54 55 let g:gruvbox_contrast_dark="hard" 56 let g:gruvbox_transparent_bg=1 57 colorscheme gruvbox 58 59 " Mapeos de teclas 60 " gardar 61 nnoremap <leader>w :w<CR> 62 " partido vertical,horizontal 63 nnoremap <leader>vs :vsp<CR> 64 nnoremap <leader>sp :sp<CR> 65 " pechar xanela (substituto por bdelete) 66 nnoremap <leader>q :Bunlink<CR> 67 " pechar vim 68 nnoremap <leader>x :q<CR> 69 " crear nova pestanha 70 nnoremap <leader>t :tabe<CR> 71 " Redimensionar particions de xanela 72 nnoremap <silent> <right> :vertical resize +5<CR> 73 nnoremap <silent> <left> :vertical resize -5<CR> 74 nnoremap <silent> <up> :resize +5<CR> 75 nnoremap <silent> <down> :resize -5<CR> 76 " Abrir o ficheiro de configuracion 77 nnoremap <leader>e :e $MYVIMRC<CR> 78 " Moverse entre particions de xanela 79 nnoremap <silent><C-Right> <c-w>l 80 nnoremap <silent><C-Left> <c-w>h 81 nnoremap <silent><C-Up> <c-w>k 82 nnoremap <silent><C-Down> <c-w>j 83 84 85 " Esto e para compilar a latex automaticamente 86 function! ZathuraOpenPdf() 87 let fullPath = expand("%:p") 88 let pdfFile = substitute(fullPath, ".txt", ".pdf", "") 89 execute "silent !pdflatex '". fullPath ."' &" 90 execute "silent !zathura '" . pdfFile . "' &" 91 endfunction 92 nnoremap <c-t> :call ZathuraOpenPdf()<CR> 93 94 hi! Normal ctermbg=NONE guibg=NONE 95 hi! NonText ctermbg=NONE guibg=NONE