diff options
| author | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-10-04 05:51:53 +0200 |
|---|---|---|
| committer | Mitja Felicijan <mitja.felicijan@gmail.com> | 2024-10-04 05:51:53 +0200 |
| commit | 354dad1d7eff597e33562ccc1b0cf77fca2dbf87 (patch) | |
| tree | c1c19a3b11b0611d3a21acf706ed3315dbc5a859 | |
| parent | 0ec6ea99c6029635472b93c68830fdc4b8f1fd07 (diff) | |
| download | dotfiles-354dad1d7eff597e33562ccc1b0cf77fca2dbf87.tar.gz | |
Updated
| -rw-r--r-- | alacritty.yml | 2 | ||||
| -rwxr-xr-x | shenanigans.sh | 1 | ||||
| -rw-r--r-- | vimrc | 56 |
3 files changed, 24 insertions, 35 deletions
diff --git a/alacritty.yml b/alacritty.yml index bc7eb22..cfb0914 100644 --- a/alacritty.yml +++ b/alacritty.yml | |||
| @@ -7,7 +7,7 @@ window: | |||
| 7 | lines: 60 | 7 | lines: 60 |
| 8 | 8 | ||
| 9 | font: | 9 | font: |
| 10 | size: 16 | 10 | size: 18 |
| 11 | normal: | 11 | normal: |
| 12 | family: Berkeley Mono | 12 | family: Berkeley Mono |
| 13 | bold: | 13 | bold: |
diff --git a/shenanigans.sh b/shenanigans.sh index e7977e9..f402c51 100755 --- a/shenanigans.sh +++ b/shenanigans.sh | |||
| @@ -53,6 +53,7 @@ export PATH=/usr/local/go/bin:$PATH | |||
| 53 | export PATH=$HOME/.local/bin/zls-x86_64-linux-0.13.0:$PATH | 53 | export PATH=$HOME/.local/bin/zls-x86_64-linux-0.13.0:$PATH |
| 54 | # export PATH=$HOME/.local/bin/zig-linux-x86_64-0.13.0:$PATH | 54 | # export PATH=$HOME/.local/bin/zig-linux-x86_64-0.13.0:$PATH |
| 55 | export PATH=$HOME/.local/bin/zig-linux-x86_64-0.14.0-dev.1587+feaee2ba1:$PATH | 55 | export PATH=$HOME/.local/bin/zig-linux-x86_64-0.14.0-dev.1587+feaee2ba1:$PATH |
| 56 | export PATH=$HOME/.local/bin/nim-2.0.8/bin:$PATH | ||
| 56 | 57 | ||
| 57 | # FZF settings. | 58 | # FZF settings. |
| 58 | 59 | ||
| @@ -1,44 +1,32 @@ | |||
| 1 | set nocompatible | 1 | colorscheme sorbet |
| 2 | set number relativenumber autoindent | 2 | set number relativenumber autoindent signcolumn=yes |
| 3 | set ignorecase smartcase incsearch | 3 | set hidden nowrap nobackup noswapfile autoread updatetime=300 |
| 4 | set hidden nowrap nobackup noswapfile autoread | ||
| 5 | set wildmenu wildmode=list:longest,full laststatus=2 | ||
| 6 | set encoding=utf8 spelllang=en_us | 4 | set encoding=utf8 spelllang=en_us |
| 7 | set backspace=2 scrolloff=4 | 5 | set backspace=2 scrolloff=4 |
| 8 | set shiftwidth=4 tabstop=4 | 6 | set shiftwidth=4 tabstop=4 |
| 9 | set path+=** gp=grep\ -irn | ||
| 10 | 7 | ||
| 11 | filetype plugin indent on | 8 | " https://github.com/junegunn/vim-plug |
| 12 | syntax enable | 9 | call plug#begin() |
| 10 | Plug 'tpope/vim-sensible' | ||
| 11 | Plug 'tpope/vim-commentary' | ||
| 12 | Plug 'tpope/vim-fugitive' | ||
| 13 | Plug 'jiangmiao/auto-pairs' | ||
| 14 | Plug 'junegunn/fzf' | ||
| 15 | Plug 'junegunn/fzf.vim' | ||
| 16 | Plug 'neoclide/coc.nvim', {'branch': 'release', 'do': 'npm install'} | ||
| 17 | call plug#end() | ||
| 13 | 18 | ||
| 14 | nnoremap <C-Right> :bnext<cr> | 19 | nnoremap <C-Right> :bnext<cr> |
| 15 | nnoremap <C-Left> :bprevious<cr> | 20 | nnoremap <C-Left> :bprevious<cr> |
| 16 | nnoremap <C-b> :buffers<cr>:buffer | ||
| 17 | nnoremap <C-q> :copen<cr> | 21 | nnoremap <C-q> :copen<cr> |
| 22 | nnoremap <C-p> :GFiles<cr> | ||
| 23 | nnoremap <C-b> :Buffers<cr> | ||
| 24 | nnoremap <C-s> :Rg<cr> | ||
| 18 | 25 | ||
| 19 | " Personal tabs/spaces settings. | 26 | nmap <silent> [g <Plug>(coc-diagnostic-prev) |
| 20 | autocmd Filetype make,go,sh setlocal noexpandtab tabstop=4 shiftwidth=4 | 27 | nmap <silent> ]g <Plug>(coc-diagnostic-next) |
| 21 | autocmd Filetype c,cpp,zig setlocal expandtab tabstop=4 shiftwidth=4 | 28 | nmap <silent> gd <Plug>(coc-definition) |
| 22 | autocmd Filetype lua,nix,html,xml,javascript,css setlocal expandtab tabstop=2 shiftwidth=2 | 29 | nmap <silent> gy <Plug>(coc-type-definition) |
| 23 | 30 | nmap <silent> gi <Plug>(coc-implementation) | |
| 24 | " Code commenting - https://stackoverflow.com/a/1676672. | 31 | nmap <silent> gr <Plug>(coc-references) |
| 25 | augroup CodeCommenting | ||
| 26 | autocmd! | ||
| 27 | autocmd FileType c,cpp,go,zig,javascript let b:comment_leader = '// ' | ||
| 28 | autocmd FileType sh,ruby,python let b:comment_leader = '# ' | ||
| 29 | autocmd FileType conf,fstab let b:comment_leader = '# ' | ||
| 30 | autocmd FileType lua,sql let b:comment_leader = '-- ' | ||
| 31 | autocmd FileType vim let b:comment_leader = '" ' | ||
| 32 | augroup END | ||
| 33 | noremap <silent> cc :<C-B>silent <C-E>s/^/<C-R>=escape(b:comment_leader,'\/')<CR>/<CR>:nohlsearch<CR> | ||
| 34 | noremap <silent> cu :<C-B>silent <C-E>s/^\(\s*\)\V<C-R>=escape(b:comment_leader,'\/')<CR>//e<CR>:nohlsearch<CR> | ||
| 35 | |||
| 36 | " FZF - fuzzy finder integration. | ||
| 37 | function! FZF() | ||
| 38 | let t=tempname() | ||
| 39 | silent execute '!fzf --preview=''cat {}'' --multi|awk ''{print $1":1:0"}'' > '.fnameescape(t) | ||
| 40 | execute 'cfile '.t|redraw! | ||
| 41 | call delete(t) | ||
| 42 | endfunction | ||
| 43 | nnoremap <C-p> :call FZF()<cr> | ||
| 44 | 32 | ||
