Skip to content

Instantly share code, notes, and snippets.

@uthantvicentin
Last active September 1, 2021 20:05
Show Gist options
  • Select an option

  • Save uthantvicentin/bda0b2f16a64f4d3aba4c635c9b2cf23 to your computer and use it in GitHub Desktop.

Select an option

Save uthantvicentin/bda0b2f16a64f4d3aba4c635c9b2cf23 to your computer and use it in GitHub Desktop.
set number relativenumber
set showbreak=~
set ts=2
set hidden
set shiftwidth=2
set smartindent
set wrap linebreak nolist
set nofoldenable
set backupdir=~/.vim/backup/
set directory=~/.vim/backup/
set nocompatible
filetype plugin on
syntax on
colorscheme gruvbox
set t_Co=256
syntax on
set background=dark
set colorcolumn=80
set noshowmode
set laststatus=2
set encoding=utf-8 " The encoding displayed.
set fileencoding=utf-8 " The encoding written to file.
:autocmd BufNewFile *.cpp 0r ~/.vim/templates/esqueleto.cpp
set wildchar=<Tab> wildmenu wildmode=full
set wildcharm=<C-Z>
nnoremap <F10> :b <C-Z>
map <C-n> :NERDTreeToggle<CR>
nnoremap <silent> <C-f> :Files<CR>
nnoremap <silent> <Leader>F :Rg<CR>
" Mappings to access buffers (don't use "\p because a
nnoremap <Leader>h :ls<CR>
nnoremap <Leader>b :bp<CR>
nnoremap <Leader>f :bn<CR>
" " It's useful to show the buffer number in the status line.
set laststatus=2 statusline=%02n:%<%f\ %h%m%r%=%-14.(%l,%c%V%)\ %P
let g:tex_flavor = 'latex'
let g:livepreview_previewer = 'zathura'
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'lervag/vimtex'
Plug 'xuhdev/vim-latex-live-preview', { 'for': 'tex' }
Plug 'ap/vim-css-color'
Plug 'tpope/vim-fugitive'
Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-surround'
Plug 'godlygeek/tabular' | Plug 'plasticboy/vim-markdown'
Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app & yarn install' }
Plug 'preservim/nerdtree'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'morhetz/gruvbox'
Plug 'vimwiki/vimwiki'
Plug 'mattn/calendar-vim'
call plug#end()
let g:mkdp_auto_close=0
let g:mkdp_refresh_slow=1
let g:mkdp_markdown_css='/home/usuario/.local/lib/github-markdown-css/github-markdown.css'
" enable tabline
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ''
let g:airline#extensions#tabline#left_alt_sep = ''
let g:airline#extensions#tabline#right_sep = ''
let g:airline#extensions#tabline#right_alt_sep = ''
" enable powerline fonts
let g:airline_powerline_fonts = 1
let g:airline_left_sep = ''
let g:airline_right_sep = ''
" Switch to your current theme
let g:airline_theme = 'gruvbox'
" Always show tabs
set showtabline=2
" We don't need to see things like -- INSERT -- anymore
set noshowmode
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
let g:vimwiki_list = [{'path': '~/Dropbox/Aplicativos/vimwiki/',
\ 'path_html': '~/mywiki_html'}]
let g:vimwiki_list = [{'path': '~/Dropbox/Aplicativos/vimwiki/',
\ 'syntax': 'markdown', 'ext': '.md'}]
" :autocmd FileType vimwiki map d :VimwikiMakeDiaryNote
function! ToggleCalendar()
execute ":Calendar"
if exists("g:calendar_open")
if g:calendar_open == 1
execute "q"
unlet g:calendar_open
else
g:calendar_open = 1
end
else
let g:calendar_open = 1
end
endfunction
:autocmd FileType vimwiki map c :call ToggleCalendar()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment