diff options
author | xengineering <me@xengineering.eu> | 2024-02-26 16:14:38 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2024-02-26 16:25:35 +0100 |
commit | 10eb7b8868675cd8f96fc54c69a47c2ed3cf3009 (patch) | |
tree | b6ce878678ff798e0ade103a79c1ede87f97cbc3 | |
parent | 7d169d63bfc11ba59d77e85121de443cb9c0974a (diff) | |
download | dotfiles-10eb7b8868675cd8f96fc54c69a47c2ed3cf3009.tar dotfiles-10eb7b8868675cd8f96fc54c69a47c2ed3cf3009.tar.zst dotfiles-10eb7b8868675cd8f96fc54c69a47c2ed3cf3009.zip |
nvim: Switch from Vimscript to Lua
Spending time learning Lua has more advantages than learning Vimscript
since Lua is used in many applications while Vimscript is just for
editor configuration.
-rw-r--r-- | nvim/init.lua | 21 | ||||
-rw-r--r-- | nvim/init.vim | 23 |
2 files changed, 21 insertions, 23 deletions
diff --git a/nvim/init.lua b/nvim/init.lua new file mode 100644 index 0000000..3542221 --- /dev/null +++ b/nvim/init.lua @@ -0,0 +1,21 @@ +vim.cmd.syntax('on') +vim.cmd.filetype({'plugin', 'indent', 'on'}) + +vim.opt.mouse = nil +vim.opt.tabstop = 4 +vim.opt.expandtab = false +vim.opt.number = true +vim.opt.shiftwidth = 4 +vim.opt.autoindent = true +vim.opt.spelllang = {'en', 'de'} +vim.opt.colorcolumn = {81} +vim.opt.encoding = 'utf-8' +vim.opt.fileencodings = {'utf-8'} +vim.opt.list = true +vim.opt.listchars = {tab = '→ ', nbsp = '␣', trail = '•'} + +vim.keymap.set('n', '<F7>', ':tabp <LF>') +vim.keymap.set('n', '<F8>', ':tabn <LF>') + +vim.keymap.set('n', '<F5>', ':%!xxd -r <LF>') +vim.keymap.set('n', '<F6>', ':%!xxd <LF>') diff --git a/nvim/init.vim b/nvim/init.vim deleted file mode 100644 index 1d9d2dc..0000000 --- a/nvim/init.vim +++ /dev/null @@ -1,23 +0,0 @@ -syntax on -filetype plugin indent on - -set mouse= -set tabstop=4 -set noexpandtab -set number -set shiftwidth=4 -set autoindent -set spelllang=en,de -set colorcolumn=81 " don't touch this line to keep 80 chars. width -set encoding=utf-8 -set fileencodings=utf-8 -set listchars=tab:→\ ,nbsp:␣,trail:•,precedes:«,extends:» -set list - -" switch tabs -map <F7> :tabp <LF> -map <F8> :tabn <LF> - -" convert *.bin file to ascii or reverse (make sure to open with `vim -b`!) -map <F5> :%!xxd -r <LF> -map <F6> :%!xxd <LF> |