aboutsummaryrefslogtreecommitdiff
path: root/vim/.vimrc
diff options
context:
space:
mode:
Diffstat (limited to 'vim/.vimrc')
-rw-r--r--vim/.vimrc49
1 files changed, 47 insertions, 2 deletions
diff --git a/vim/.vimrc b/vim/.vimrc
index bfea324..ecfd17e 100644
--- a/vim/.vimrc
+++ b/vim/.vimrc
@@ -1,4 +1,4 @@
-syntax on
+syntax enable
filetype plugin indent on
set tabstop=4
set shiftwidth=4
@@ -9,4 +9,49 @@ set number
set ignorecase
set smartcase
set incsearch
-set modeline \ No newline at end of file
+set modeline
+set nohlsearch
+
+autocmd FileType org,outline setlocal nofoldenable
+call plug#begin()
+Plug 'junegunn/goyo.vim'
+Plug 'junegunn/fzf.vim'
+Plug 'tpope/vim-commentary'
+Plug 'tpope/vim-surround'
+Plug 'ap/vim-css-color'
+Plug 'zah/nim.vim'
+call plug#end()
+vmap <C-c> "+yi
+vmap <C-x> "+c
+vmap <C-v> c<ESC>"+p
+imap <C-v> <ESC>"+pa
+
+function! BardFindNotesFile()
+ let l:cmd = "find ~/Notes/denote -type f -name '*.org' " .
+ \ "! -path '*/.git/*' ! -path '*/.cache/*' | " .
+ \ "grep -E './[0-9]{8}T[0-9]{6}--.*\\.org$'"
+ call fzf#run(fzf#wrap({
+ \ 'source': l:cmd,
+ \ 'sink': 'e',
+ \ 'options': '--prompt "Notes> " --preview "cat {}"'
+ \ }))
+endfunction
+
+command! FindNotesFile call BardFindNotesFile()
+
+function! BardSearchNotes()
+ call fzf#vim#grep(
+ \ "rg --column --line-number --no-heading --color=always " .
+ \ "--hidden --glob '!**/.git/*' --glob '!**/.cache/*' " .
+ \ "' ' ~/Notes/denote", 1,
+ \ fzf#vim#with_preview(), 0)
+endfunction
+
+command! SearchNotes call BardSearchNotes()
+
+" KEYBINDS
+let mapleader = " "
+nnoremap <Leader>fn :FindNotesFile<CR>
+nnoremap <Leader>sn :SearchNotes<CR>
+nnoremap <Leader>ff :Files<CR>
+nnoremap <Leader>b :Marks<CR>