Add skeletons, fix double-eval of filetype.vim

This commit is contained in:
Barak Michener 2022-07-24 13:44:18 -07:00
parent 08d8a22709
commit a7c30c7a27
5 changed files with 36 additions and 21 deletions

View file

@ -1,8 +1,10 @@
" general per-language filetype file
if exists("did\_load\_filetypes")
if exists("g:did_load_personal_filetypes")
finish
endif
let g:did_load_personal_filetypes = 1
" Filetype mappingss
augroup markdown
au! BufRead,BufNewFile *.mkd setfiletype markdown
@ -117,7 +119,8 @@ autocmd FileType idris let b:auto_trim_whitespace=1
autocmd FileType java let b:auto_trim_whitespace=1
augroup templates
autocmd BufNewFile *.vue 0r ~/.vim/skeletons/skeleton.vue
autocmd BufNewFile *.vue 0r ~/.vim/skeletons/vue.skel
autocmd BufNewFile *.svelte 0r ~/.vim/skeletons/svelte.skel
augroup end
augroup rust

View file

@ -0,0 +1,9 @@
<script lang="ts">
import { onMount, onDestroy } from "svelte";
</script>
<div>
</div>
<style>
</style>

3
.vimrc
View file

@ -355,9 +355,12 @@ colorscheme codedark
"colorscheme slate
"colorscheme dante
" Turn on the cursorline (highlight on line under cursor) but only for the
" window and buffer you're currently in. A handy trick, I'm trying out as of
" 2013-04-12 but the jury is still out.
"
" 2022-07-24 -- It's essential and I got a laugh reading this 9 years later.
autocmd BufEnter * setlocal cursorline
autocmd WinEnter * setlocal cursorline
autocmd WinLeave * setlocal nocursorline