Skip to content

Commit

Permalink
Restructuring
Browse files Browse the repository at this point in the history
  • Loading branch information
heussd committed Aug 24, 2024
1 parent 40275f0 commit fc7fc3b
Show file tree
Hide file tree
Showing 16 changed files with 102 additions and 92 deletions.
3 changes: 1 addition & 2 deletions .config/vim/writer/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ call plug#begin(root . 'plugged')
Plug 'jamessan/vim-gnupg', { 'commit': 'f9b608f' }
Plug 'junegunn/goyo.vim'
Plug 'junegunn/limelight.vim'

Plug 'girishji/vimcomplete'
call plug#end()

set nobackup "no backup files
Expand Down Expand Up @@ -60,7 +60,6 @@ map <s-j> <S-}>
map <s-k> <S-{>

command Date :r! date "+\%Y-\%m-\%d \%H:\%M"
:nnoremap ns i## <Esc>:Date

Expand Down
48 changes: 0 additions & 48 deletions .vim/basic-config.vim

This file was deleted.

5 changes: 0 additions & 5 deletions .vim/fzf.vim

This file was deleted.

18 changes: 0 additions & 18 deletions .vim/keys.vim

This file was deleted.

4 changes: 0 additions & 4 deletions .vim/commands.vim → .vim/plugin/command-date.vim
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
" Open current editor file externally
nnoremap gO :!open '%:p'<CR>

function Date()
:r! date "+\%Y-\%m-\%d \%H:\%M"
endfunction
Expand Down
File renamed without changes.
3 changes: 3 additions & 0 deletions .vim/plugin/command-openexternally.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
" Open current editor file externally
nnoremap gO :!open '%:p'<CR>
12 changes: 12 additions & 0 deletions .vim/plugin/keys-fzf-awesomeness.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
command! -bang -nargs=* GGrep
\ call fzf#vim#grep(
\ 'git grep --line-number -- '.shellescape(<q-args>), 0,
\ fzf#vim#with_preview({'dir': systemlist('git rev-parse --show-toplevel')[0]}), <bang>0)

let g:fzf_action = {
\ 'ctrl-t': 'tab split',
\ 'ctrl-i': 'split',
\ 'ctrl-v': 'vsplit' }

map <C-F> :GFiles <CR>
map <C-G> :GGrep <CR>
4 changes: 4 additions & 0 deletions .vim/plugin/keys-leader.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
let mapleader=","

nnoremap <Leader>b :<C-u>call gitblame#echo()<CR>
3 changes: 3 additions & 0 deletions .vim/plugin/keys-make-backspace-great-again.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
" https://vi.stackexchange.com/questions/2162/why-doesnt-the-backspace-key-work-in-insert-mode#answer-2163
set backspace=indent,eol,start

3 changes: 3 additions & 0 deletions .vim/plugin/keys-paragraph-jumping.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
map <s-j> <S-}>
map <s-k> <S-{>
6 changes: 6 additions & 0 deletions .vim/plugin/special-files.vim
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,9 @@ autocmd BufWritePre ~/.config/stew/Stewfile :%sort
autocmd BufWritePre ~/.config/newsboat/killfile :%sort
autocmd BufWritePre ~/.config/newsboat/highlights :%sort
autocmd BufWritePre ~/.config/newsboat/highlights :%sort

autocmd BufRead,BufNewFile reflections setfiletype reflections
autocmd BufRead,BufNewFile urls,config setfiletype conf.tabsep

autocmd BufRead compose*.yml source ~/.vim/files/docker-compose.vim

5 changes: 0 additions & 5 deletions .vim/theme.vim → .vim/plugin/theme.vim
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
let g:gruvbox_transparent_bg = 1
let g:gruvbox_contrast_light = "hard"
colorscheme gruvbox


hi CursorLine term=bold cterm=bold guibg=Grey40
hi Folded ctermbg=NONE guibg=NONE

Expand Down
23 changes: 23 additions & 0 deletions .vim/plugin/vimcompletion.vim
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
vim9script

var options = {
completor: {
alwaysOn: true,
shuffleEqualPriority: true,
postfixHighlight: true
},
buffer: { enable: true, priority: 10, urlComplete: true, envComplete: true },
abbrev: { enable: true, priority: 10 },
omnifunc: { enable: false, priority: 8, filetypes: ['python', 'javascript'] },
ngram: {
enable: true,
priority: 10,
bigram: false,
filetypes: ['text', 'help', 'markdown'],
filetypesComments: ['c', 'cpp', 'python', 'java'],
},
}
g:vimcomplete_tab_enable = 1
g:vimcomplete_cr_enable = 0

autocmd VimEnter * g:VimCompleteOptionsSet(options)
1 change: 1 addition & 0 deletions .vim/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,5 @@ Plug 'stsewd/gx-extended.vim'
Plug 'tpope/vim-fugitive'
Plug 'vimwiki/vimwiki'
Plug 'zivyangll/git-blame.vim'
Plug 'girishji/vimcomplete'
call plug#end()
56 changes: 46 additions & 10 deletions .vim/vimrc
Original file line number Diff line number Diff line change
@@ -1,25 +1,59 @@
source ~/.vim/basic-config.vim
" https://stackoverflow.com/questions/743150/how-to-prevent-vim-from-creating-and-leaving-temporary-files
set nobackup "no backup files
set nowritebackup "only in case you don't want a backup file while editing
set noswapfile "no swap files
" https://stackoverflow.com/questions/2816719/clear-the-viminfo-file
set viminfo= "no ~/.viminfo file

" Essential: use proper encryption by default
" https://dgl.cx/2014/10/vim-blowfish
:setlocal cm=blowfish2
" Line Numbers
set number
" turn hybrid line numbers on
set number relativenumber

" Highlight current line
set cursorline

" hlsearch word Taken from http://nvie.com/posts/how-i-boosted-my-vim/
set autoindent " always set autoindenting on
set copyindent " copy the previous indentation on autoindenting
set showmatch " set show matching parenthesis
set ignorecase " ignore case when searching
set smartcase " ignore case if search pattern is all lowercase,
" case-sensitive otherwise
set hlsearch " highlight search terms
set incsearch " show search matches as you type


set encoding=utf-8 " Use UTF-8 everywhere.
set termencoding=utf-8


set wrap
set linebreak
syntax enable

set nocompatible
filetype plugin on



" Neocomplete
let g:neocomplete#enable_at_startup = 1
let g:neocomplete#enable_smart_case = 1

source ~/.vim/plugins.vim

au BufRead,BufNewFile reflections setfiletype reflections
au BufRead,BufNewFile urls,config setfiletype conf.tabsep


let g:indentLine_char = ''


source ~/.vim/ale.vim
source ~/.vim/fzf.vim
source ~/.vim/folds.vim
source ~/.vim/vimwiki.vim
source ~/.vim/commands.vim

autocmd BufRead docker-compose*.yml source ~/.vim/files/docker-compose.vim

let g:netrw_liststyle = 3

Expand All @@ -29,5 +63,7 @@ set maxmempattern=5000


source ~/.vim/auto-dark.vim
source ~/.vim/theme.vim
source ~/.vim/keys.vim

let g:gruvbox_transparent_bg = 1
let g:gruvbox_contrast_light = "hard"
colorscheme gruvbox

0 comments on commit fc7fc3b

Please sign in to comment.