almost done converting init.vim to init.lua, just need to install nvim-completion

This commit is contained in:
tomit4 2022-04-23 09:44:23 -07:00
parent f371d214c1
commit e48c506796
3 changed files with 83 additions and 13 deletions

View file

@ -1,3 +1,6 @@
-- remap leader key
vim.g.mapleader = ","
-- remap Nvim_Tree toggle to CTRL+B
keymap('n', '<c-b>', '<c-w>:NvimTreeToggle<CR>', {})
@ -24,3 +27,16 @@ keymap('n', '<c-x>', '<c-w>:nohl<CR>', {silent = true})
-- Toggle Multi-Cursor with j or k
vim.cmd[[nmap <C-j> <C-Down>]]
vim.cmd[[nmap <C-k> <C-Up>]]
-- Escape Insert Mode with ii
keymap('i', 'ii', '<Esc>', {})
-- Insert a console.log()
vim.cmd[[ inoremap cll console.log()<esc>i]]
-- Alias replace all to shift + S
vim.cmd[[nnoremap S :%s///gI<Left><Left><Left><Left>]]
-- j/k will move virtual lines (lines that wrap)
vim.cmd[[noremap <silent> <expr> j (v:count == 0 ? 'gj' : 'j')]]
vim.cmd[[noremap <silent> <expr> k (v:count == 0 ? 'gk' : 'k')]]