Skip to content

Instantly share code, notes, and snippets.

@mhrstmnn
Last active April 24, 2024 19:37
Show Gist options
  • Save mhrstmnn/4297fb0bcf200c080a7c9834bdfa21c6 to your computer and use it in GitHub Desktop.
Save mhrstmnn/4297fb0bcf200c080a7c9834bdfa21c6 to your computer and use it in GitHub Desktop.
Template for new Neovim configurations
-- help relativenumber
vim.cmd [[set relativenumber]]
-- help restore-cursor
-- help last-position-jump
vim.cmd [[autocmd BufRead * autocmd FileType <buffer> ++once
\ if &ft !~# 'commit\|rebase' && line("'\"") > 1 && line("'\"") <= line("$") | exe 'normal! g`"' | endif]]
" help relativenumber
set relativenumber
" help restore-cursor
" help last-position-jump
autocmd BufRead * autocmd FileType <buffer> ++once
\ if &ft !~# 'commit\|rebase' && line("'\"") > 1 && line("'\"") <= line("$") | exe 'normal! g`"' | endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment