nvim: cleanup
This commit is contained in:
parent
2f02c47ef0
commit
e36365b4e8
|
@ -9,14 +9,13 @@ packer.use {
|
|||
require'nvim-treesitter.configs'.setup {
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = {'org'}
|
||||
additional_vim_regex_highlighting = { 'org' }
|
||||
},
|
||||
ensure_installed = {'org'},
|
||||
ensure_installed = { 'org' },
|
||||
}
|
||||
end
|
||||
}
|
||||
|
||||
-- org
|
||||
packer.use {
|
||||
'https://github.com/nvim-orgmode/orgmode',
|
||||
requires = 'https://github.com/nvim-treesitter/nvim-treesitter',
|
||||
|
|
|
@ -8,26 +8,26 @@ vim.g.maplocalleader = ' ' -- <LocalLeader> (2 spaces)
|
|||
local format = string.format
|
||||
|
||||
-- buffers
|
||||
map('n', '<Leader>b', ':buffers<CR>:buffer<Space>')
|
||||
map('n', '<Leader>b', ':buffers<CR>:buffer<Space>')
|
||||
for key, cmd in pairs({ Left = 'bprevious', Right = 'bnext' }) do
|
||||
map('n', format('<M-%s>', key), format(':%s<cr>', cmd))
|
||||
map('i', format('<M-%s>', key), format('<esc>:%s<cr>', cmd))
|
||||
end
|
||||
-- move buffer without moving cursor
|
||||
map({ 'n', 'v' }, '<M-Up>', '<C-y>')
|
||||
map({ 'n', 'v' }, '<M-Down>', '<C-e>')
|
||||
---- move buffer without moving cursor
|
||||
map({ 'n', 'v' }, '<M-Up>', '<C-y>')
|
||||
map({ 'n', 'v' }, '<M-Down>', '<C-e>')
|
||||
|
||||
--windows
|
||||
-- windows
|
||||
for key, letter in pairs({ Left = 'h', Down = 'j', Up = 'k', Right = 'l' }) do
|
||||
map('n', format('<M-S-%s>', key), format(':wincmd %s<cr>', letter))
|
||||
map('i', format('<M-S-%s>', key), format('<esc>:wincmd %s<cr>', letter))
|
||||
end
|
||||
|
||||
-- remove word
|
||||
map('n', '<M-BS>', 'db')
|
||||
map('n', '<M-BS>', 'db')
|
||||
vim.cmd([[map! <M-BS> <C-W>]]) -- TODO: figure out how to do that with lua
|
||||
map('n', '<C-Del>', 'dw')
|
||||
map('i', '<C-Del>', '<C-O>dw')
|
||||
map('n', '<C-Del>', 'dw')
|
||||
map('i', '<C-Del>', '<C-O>dw')
|
||||
|
||||
-- remove whitespace around cursor
|
||||
map({ 'n', 'i' }, '<C-S-Del>',
|
||||
|
@ -75,8 +75,8 @@ map({ 'n', 'v' }, '<C-F>', '==') -- re-indent line
|
|||
|
||||
-- select text with shift + arrow
|
||||
for _, key in ipairs({ 'Left', 'Up', 'Down', 'Right' }) do
|
||||
map({ 'n', 'i' }, format('<S-%s>', key), format('<Esc>v<%s>', key))
|
||||
map({ 'v' }, format('<S-%s>', key), format('<%s>', key))
|
||||
map({ 'n', 'i' }, format('<S-%s>', key), format('<Esc>v<%s>', key))
|
||||
map({ 'v' }, format('<S-%s>', key), format('<%s>', key))
|
||||
end
|
||||
|
||||
map('n', '<F9>', ':Lexplore 20<cr>') -- file explorer, 20% width
|
||||
|
|
|
@ -8,7 +8,7 @@ vim.o.linebreak = true -- break on word boundaries
|
|||
|
||||
vim.o.cursorline = true -- highlight row with cursor
|
||||
vim.o.scrolloff = 5 -- show 5 lines below/above cursor
|
||||
vim.o.sidescrolloff = 5 -- same fore left/right
|
||||
vim.o.sidescrolloff = 5 -- same for left/right
|
||||
vim.o.expandtab = true -- indent using spaces
|
||||
vim.o.tabstop = 4 -- 1 tab = 4 spaces
|
||||
vim.o.shiftwidth = 4 -- 1 indentation = 4 spaces
|
||||
|
@ -16,11 +16,10 @@ vim.o.completeopt = 'menu,menuone,noselect' -- completion popup
|
|||
vim.o.autochdir = true -- change workir to current file dir
|
||||
vim.o.updatetime = 500 -- fire CursorHold autocommand event
|
||||
vim.o.cmdheight = 2 -- message area size
|
||||
-- vim.o.mouse = 'nv' -- make use of mouse in these modes
|
||||
vim.o.mouse = '' -- make use of mouse in these modes
|
||||
vim.o.pumheight = 10 -- maximum entries in popup menu
|
||||
vim.o.smartindent = true -- indent after { and so on
|
||||
|
||||
|
||||
-- theme
|
||||
vim.o.termguicolors = true -- 24 bit colours
|
||||
packer.use {
|
||||
|
|
Loading…
Reference in New Issue
Block a user