mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-09 23:22:57 +00:00
homemade vim snippets
This commit is contained in:
parent
2a605f703d
commit
9c1111f4de
@ -94,7 +94,8 @@ endif
|
||||
" Custom Commands
|
||||
"----------------
|
||||
|
||||
command Vimrc edit ~/.config/nvim/init.vim " Edit .vimrc (this file)
|
||||
command! Vimrc edit ~/.config/nvim/init.vim " Edit .vimrc (this file)
|
||||
command! Refresh source ~/.config/nvim/init.vim " Refresh from .vimrc (this file)
|
||||
|
||||
" Custom Keybinds
|
||||
"----------------
|
||||
@ -160,9 +161,19 @@ nnoremap <Leader>wm :only<cr>
|
||||
" Exit terminal mode (requires Alacritty escape)
|
||||
tnoremap <S-CR> <C-\><C-n>
|
||||
|
||||
" Reload Vimrc settings
|
||||
nnoremap <Leader>rr :Refresh<cr>
|
||||
nnoremap <Leader>rp :Refresh<cr> :PlugInstall<cr>
|
||||
|
||||
" Open file tree
|
||||
noremap <silent> <Leader>ft :Fern . -drawer -width=35 -toggle<CR><C-w>=
|
||||
|
||||
" Snippets
|
||||
"---------
|
||||
|
||||
nnoremap ,sh :-1read $DOTS/shell/templates/skeleton.sh<CR>Gdd03kC
|
||||
nnoremap ,py :-1read $DOTS/shell/templates/skeleton.py<CR>Gdd08kC
|
||||
|
||||
" LaTeX Settings
|
||||
"---------------
|
||||
|
||||
|
@ -5,7 +5,7 @@ fisher update
|
||||
|
||||
# Set $PATH for finding programs
|
||||
set -U FISH_DIR (readlink ~/.config/fish)
|
||||
set -U DOTS (dirname $FISH_DIR)
|
||||
set -Ux DOTS (dirname $FISH_DIR)
|
||||
set -U CDPATH . $HOME
|
||||
set -U EDITOR nvim
|
||||
set -U PROJ $HOME/dev/work
|
||||
|
12
shell/templates/skeleton.py
Normal file
12
shell/templates/skeleton.py
Normal file
@ -0,0 +1,12 @@
|
||||
#!/usr/bin/env python
|
||||
|
||||
"""
|
||||
Program
|
||||
"""
|
||||
|
||||
def main():
|
||||
"""Run the program"""
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
Loading…
Reference in New Issue
Block a user