cd into notes and vimrc command

This commit is contained in:
Noah Masur 2020-08-01 09:46:48 -04:00
parent 213e471769
commit a3026b91ba
3 changed files with 10 additions and 3 deletions

View File

@ -590,7 +590,7 @@ shell:
# in the order they were defined in.
key_bindings:
- { key: F, mods: Super, action: ToggleSimpleFullscreen }
- { key: A, mods: Super, chars: "\x02" }
- { key: A, mods: Super, chars: "\x02" } # CMD-A sends CTRL-B for tmux
#- { key: Paste, action: Paste }
#- { key: Copy, action: Copy }

View File

@ -17,8 +17,9 @@ function notes --description "Notes functions"
end
function today --description "Open today's journal"
cd $HOME/Documents/notes
set today (date -j +"%Y-%m-%d_%a")
set today_journal $HOME/Documents/notes/$today.md
set today_journal $today.md
if [ -f $today_journal ]
vim $today_journal
else
@ -29,13 +30,16 @@ function notes --description "Notes functions"
echo "New journal added."
vim $today_journal
end
cd -
end
function wiki --description "Open vimwiki file"
set file (fd . ~/Documents/notes | fzf)
cd $HOME/Documents/notes
set file (ls | fzf)
if [ $status -eq 0 ]
vim $file
end
cd -
end
function note --description "Edit or create a note"

View File

@ -67,6 +67,9 @@ if !isdirectory(&undodir)
call mkdir(&undodir, "p")
endif
" Command to edit vimrc (this file)
command Vimrc edit ~/.config/nvim/init.vim
" Map the leader key
map <Space> <Leader>