mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
cd into notes and vimrc command
This commit is contained in:
parent
213e471769
commit
a3026b91ba
@ -590,7 +590,7 @@ shell:
|
|||||||
# in the order they were defined in.
|
# in the order they were defined in.
|
||||||
key_bindings:
|
key_bindings:
|
||||||
- { key: F, mods: Super, action: ToggleSimpleFullscreen }
|
- { 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: Paste, action: Paste }
|
||||||
#- { key: Copy, action: Copy }
|
#- { key: Copy, action: Copy }
|
||||||
|
@ -17,8 +17,9 @@ function notes --description "Notes functions"
|
|||||||
end
|
end
|
||||||
|
|
||||||
function today --description "Open today's journal"
|
function today --description "Open today's journal"
|
||||||
|
cd $HOME/Documents/notes
|
||||||
set today (date -j +"%Y-%m-%d_%a")
|
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 ]
|
if [ -f $today_journal ]
|
||||||
vim $today_journal
|
vim $today_journal
|
||||||
else
|
else
|
||||||
@ -29,13 +30,16 @@ function notes --description "Notes functions"
|
|||||||
echo "New journal added."
|
echo "New journal added."
|
||||||
vim $today_journal
|
vim $today_journal
|
||||||
end
|
end
|
||||||
|
cd -
|
||||||
end
|
end
|
||||||
|
|
||||||
function wiki --description "Open vimwiki file"
|
function wiki --description "Open vimwiki file"
|
||||||
set file (fd . ~/Documents/notes | fzf)
|
cd $HOME/Documents/notes
|
||||||
|
set file (ls | fzf)
|
||||||
if [ $status -eq 0 ]
|
if [ $status -eq 0 ]
|
||||||
vim $file
|
vim $file
|
||||||
end
|
end
|
||||||
|
cd -
|
||||||
end
|
end
|
||||||
|
|
||||||
function note --description "Edit or create a note"
|
function note --description "Edit or create a note"
|
||||||
|
@ -67,6 +67,9 @@ if !isdirectory(&undodir)
|
|||||||
call mkdir(&undodir, "p")
|
call mkdir(&undodir, "p")
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
" Command to edit vimrc (this file)
|
||||||
|
command Vimrc edit ~/.config/nvim/init.vim
|
||||||
|
|
||||||
" Map the leader key
|
" Map the leader key
|
||||||
map <Space> <Leader>
|
map <Space> <Leader>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user