Created
November 22, 2022 06:01
-
-
Save simon-mo/6be14f38cb91fcfd2fb4868f3b6c4a76 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" Sensible setup | |
set nocompatible | |
filetype plugin on | |
" Install Vim Plug | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
endif | |
" Plugins | |
call plug#begin() | |
Plug 'scrooloose/nerdcommenter' | |
Plug 'scrooloose/nerdtree' | |
Plug 'tpope/vim-fugitive' | |
Plug 'tpope/vim-sensible' | |
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' } | |
Plug 'junegunn/fzf.vim' | |
Plug 'junegunn/goyo.vim' | |
Plug 'junegunn/limelight.vim' | |
Plug 'bfrg/vim-cpp-modern' | |
Plug 'chriskempson/base16-vim' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} | |
call plug#end() | |
" Themes | |
syntax enable | |
let base16colorspace=256 | |
colorscheme base16-default-dark | |
set termguicolors | |
" set t_Co=256 | |
" set background=dark | |
" Toggle Paste Mode | |
let &t_SI .= "\<Esc>[?2004h" | |
let &t_EI .= "\<Esc>[?2004l" | |
inoremap <special> <expr> <Esc>[200~ XTermPasteBegin() | |
function! XTermPasteBegin() | |
set pastetoggle=<Esc>[201~ | |
set paste | |
return "" | |
endfunction | |
filetype plugin indent on | |
" show existing tab with 4 spaces width | |
set tabstop=2 | |
" when indenting with '>', use 4 spaces width | |
set shiftwidth=2 | |
" On pressing tab, insert 4 spaces | |
set expandtab | |
set relativenumber | |
" Let vim change my window title | |
set title | |
" Show matching braces/brackets | |
set showmatch | |
set ruler | |
set incsearch | |
set smartcase | |
" Jump to last visited location | |
autocmd BufReadPost * | |
\ if line("'\"") >= 1 && line("'\"") <= line("$") && &ft !~# 'commit' | |
\ | exe "normal! g`\"" | |
\ | endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment