dotfiles/.config/nvim/init.vim

36 lines
1,009 B
VimL
Raw Normal View History

2021-04-18 18:51:03 +02:00
lua require("init")
2016-10-26 11:59:39 +02:00
2021-07-22 10:32:46 +02:00
set title
set titlestring=%F%m\ %r\ %y
2021-04-18 18:51:03 +02:00
function s:recompile_plugins()
luafile %
PackerCompile
endfunction
2021-04-18 18:51:03 +02:00
"" Autocommands
2020-11-15 14:30:52 +01:00
2021-04-18 18:51:03 +02:00
augroup recompile_plugins
autocmd!
autocmd BufWritePost plugins.lua call <SID>recompile_plugins()
augroup END
2021-04-19 15:28:25 +02:00
2021-04-20 18:10:56 +02:00
autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
2021-06-17 11:29:04 +02:00
autocmd BufRead,BufNewFile *.hcl set filetype=terraform
autocmd BufRead,BufNewFile *.tf set filetype=terraform
2021-04-19 15:28:25 +02:00
"" Temporary hacks
" Show syntax highlight group in the status bar
map ,H :echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"<CR>
2021-12-20 12:10:15 +01:00
function! SynGroup()
let l:s = synID(line('.'), col('.'), 1)
echo synIDattr(l:s, 'name') . ' -> ' . synIDattr(synIDtrans(l:s), 'name')
endfun
map ,J :call SynGroup()<CR>
2021-04-19 15:28:25 +02:00
map ,L :luafile %<CR>