2023-04-30 12:56:57 -04:00
|
|
|
set tabstop=4 shiftwidth=4 noexpandtab ai nosmd ignorecase smartcase
|
|
|
|
|
2023-05-20 15:43:21 -04:00
|
|
|
" terminal settings
|
|
|
|
" disable line numbers
|
|
|
|
au TermOpen * setlocal nonumber norelativenumber
|
|
|
|
" make ESC go to normal mode
|
|
|
|
tnoremap <silent> <esc> <c-\><c-n><c-\><c-n>
|
|
|
|
|
2023-04-30 12:56:57 -04:00
|
|
|
" sign column on top of the line number (gutter for things like breakpoints, warnings)
|
|
|
|
set scl=number
|
|
|
|
|
|
|
|
" enable line numbers
|
|
|
|
set number relativenumber
|
|
|
|
|
|
|
|
" disable bottom right status line
|
|
|
|
set noruler
|
2023-03-19 13:10:16 -04:00
|
|
|
set showtabline=0
|
2023-04-30 12:56:57 -04:00
|
|
|
|
|
|
|
" performance?
|
2022-07-04 21:39:27 -04:00
|
|
|
set lazyredraw nocursorline ttyfast
|
2023-04-30 12:56:57 -04:00
|
|
|
|
|
|
|
" use system clipboard instead of internal
|
2023-04-11 18:06:02 -04:00
|
|
|
set clipboard=unnamedplus
|
2023-05-03 21:21:59 -04:00
|
|
|
" when using c or s, do not overwrite clipboard
|
2023-04-30 12:56:57 -04:00
|
|
|
nnoremap c "-c
|
2023-05-29 21:24:33 -04:00
|
|
|
vnoremap c "-c
|
2023-05-03 21:21:59 -04:00
|
|
|
nnoremap s "-s
|
2023-05-29 21:24:33 -04:00
|
|
|
vnoremap s "-s
|
2021-06-19 15:50:50 -04:00
|
|
|
|
2023-03-19 12:55:08 -04:00
|
|
|
let mapleader = ","
|
2022-12-10 11:45:48 -05:00
|
|
|
|
|
|
|
set shell=/bin/sh
|
|
|
|
|
2021-07-26 09:32:48 -04:00
|
|
|
hi Search cterm=NONE ctermfg=white ctermbg=blue
|
2021-08-24 21:36:54 -04:00
|
|
|
hi StatusLine ctermbg=NONE cterm=italic
|
2023-04-12 18:19:11 -04:00
|
|
|
hi SignColumn ctermbg=NONE
|
|
|
|
|
2021-08-24 21:36:54 -04:00
|
|
|
autocmd InsertEnter * hi StatusLine cterm=bold
|
|
|
|
autocmd InsertLeave * hi StatusLine cterm=italic
|
2021-07-26 09:32:48 -04:00
|
|
|
|
2021-06-19 15:50:50 -04:00
|
|
|
highlight LineNr ctermfg=grey
|
2022-06-01 20:02:57 -04:00
|
|
|
|
2022-07-01 18:18:55 -04:00
|
|
|
" Disable highlighting when searching
|
2022-07-05 17:28:32 -04:00
|
|
|
nnoremap <silent> <esc> :noh<return><esc>
|
2022-06-28 21:14:41 -04:00
|
|
|
|
2023-05-20 15:43:21 -04:00
|
|
|
" shortcuts to type symbols easier
|
|
|
|
source $XDG_CONFIG_HOME/nvim/digraphs.vim
|
2023-03-19 12:55:08 -04:00
|
|
|
|
|
|
|
" tab, window management
|
2023-05-20 15:43:21 -04:00
|
|
|
set splitbelow splitright
|
2023-03-19 12:55:08 -04:00
|
|
|
nnoremap <C-j> <C-w>w
|
|
|
|
nnoremap <C-k> <C-w>W
|
2023-05-20 15:43:21 -04:00
|
|
|
nnoremap <silent> <C-h> :vertical resize -5<cr>
|
|
|
|
nnoremap <silent> <C-l> :vertical resize +5<cr>
|
2023-04-11 19:43:21 -04:00
|
|
|
" exit all (akin to ZZ, ZQ)
|
|
|
|
nnoremap <silent> ZF :qa<cr>
|
2023-03-19 12:55:08 -04:00
|
|
|
|
2023-04-13 10:17:39 -04:00
|
|
|
" copy URL under cursor to clipboard bind
|
|
|
|
:nnoremap <silent><leader>uu :let @+ = expand('<cfile>')<CR>
|
|
|
|
|
2022-12-10 11:45:48 -05:00
|
|
|
" Plugins
|
|
|
|
|
2023-01-12 18:18:34 -05:00
|
|
|
" Run PlugInstall if there are missing plugins
|
2023-04-13 10:17:39 -04:00
|
|
|
if $SYSTEM_PROFILE == "DEFAULT"
|
|
|
|
autocmd VimEnter * if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
|
|
|
\| PlugInstall --sync | source $MYVIMRC
|
|
|
|
\| endif
|
|
|
|
endif
|
2023-02-14 19:16:14 -05:00
|
|
|
|
2023-04-13 10:17:39 -04:00
|
|
|
" The rest will not be sourced if the system is on minimal settings.
|
|
|
|
if $SYSTEM_PROFILE == "MINIMAL"
|
|
|
|
finish
|
|
|
|
endif
|
2023-01-12 18:18:34 -05:00
|
|
|
|
2022-12-10 11:45:48 -05:00
|
|
|
call plug#begin()
|
|
|
|
|
|
|
|
filetype plugin indent on
|
|
|
|
|
2023-05-20 15:43:21 -04:00
|
|
|
" i don't use LaTeX anymore, but you can uncomment this to
|
|
|
|
"source $XDG_CONFIG_HOME/nvim/vimtex.vim
|
2023-04-13 10:17:39 -04:00
|
|
|
|
2023-05-20 15:43:21 -04:00
|
|
|
source $XDG_CONFIG_HOME/nvim/ultisnips.vim
|
2023-04-12 18:19:11 -04:00
|
|
|
|
2023-04-13 10:17:39 -04:00
|
|
|
if $SYSTEM_PROFILE == "DEFAULT"
|
2023-05-20 15:43:21 -04:00
|
|
|
" notes and documents stuff
|
|
|
|
source $XDG_CONFIG_HOME/nvim/typst.vim
|
2023-04-12 18:49:17 -04:00
|
|
|
|
2023-05-20 15:43:21 -04:00
|
|
|
" plugins for IDE-like nvim
|
|
|
|
source $XDG_CONFIG_HOME/nvim/coding.vim
|
2023-04-13 10:17:39 -04:00
|
|
|
endif
|
2023-01-21 21:46:35 -05:00
|
|
|
|
2023-05-13 12:20:02 -04:00
|
|
|
" URL motions
|
2023-04-09 12:23:12 -04:00
|
|
|
Plug 'axieax/urlview.nvim'
|
|
|
|
|
2023-05-13 12:20:02 -04:00
|
|
|
" fancy motions
|
2023-04-12 18:19:11 -04:00
|
|
|
Plug 'ggandor/leap.nvim'
|
2023-04-12 11:20:21 -04:00
|
|
|
|
2023-05-21 21:39:29 -04:00
|
|
|
Plug 'ledger/vim-ledger'
|
|
|
|
|
2022-12-10 11:45:48 -05:00
|
|
|
call plug#end()
|
2023-01-21 21:46:35 -05:00
|
|
|
|
2023-04-13 10:17:39 -04:00
|
|
|
if $SYSTEM_PROFILE == "DEFAULT"
|
|
|
|
" see .config/nvim/lua/init.lua
|
|
|
|
lua require('init')
|
|
|
|
endif
|