From 10eb7b8868675cd8f96fc54c69a47c2ed3cf3009 Mon Sep 17 00:00:00 2001 From: xengineering Date: Mon, 26 Feb 2024 16:14:38 +0100 Subject: 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. --- nvim/init.lua | 21 +++++++++++++++++++++ nvim/init.vim | 23 ----------------------- 2 files changed, 21 insertions(+), 23 deletions(-) create mode 100644 nvim/init.lua delete mode 100644 nvim/init.vim (limited to 'nvim') 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', '', ':tabp ') +vim.keymap.set('n', '', ':tabn ') + +vim.keymap.set('n', '', ':%!xxd -r ') +vim.keymap.set('n', '', ':%!xxd ') 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 :tabp -map :tabn - -" convert *.bin file to ascii or reverse (make sure to open with `vim -b`!) -map :%!xxd -r -map :%!xxd -- cgit v1.2.3-70-g09d2