66 lines
1.8 KiB
Lua
66 lines
1.8 KiB
Lua
vim.g.mapleader = " "
|
|
|
|
-- Uncategorized
|
|
vim.g.nocompatible = true
|
|
vim.o.history = 1000
|
|
vim.o.title = true
|
|
vim.o.encoding = 'utf-8'
|
|
vim.o.scrolloff = 3
|
|
vim.o.ttyfast = true
|
|
vim.o.laststatus = 2
|
|
vim.o.ff = 'unix'
|
|
vim.o.number = true
|
|
|
|
-- File indentation
|
|
vim.o.tabstop = 2
|
|
vim.o.shiftwidth = vim.o.tabstop
|
|
vim.o.softtabstop = vim.o.tabstop
|
|
vim.g.nojoinspaces = true
|
|
vim.o.expandtab = true
|
|
vim.o.listchars = 'tab:>-,trail:-'
|
|
vim.o.list = true
|
|
|
|
-- Searching
|
|
vim.o.hlsearch = true
|
|
vim.o.incsearch = true
|
|
|
|
-- Alerts
|
|
vim.o.visualbell = true
|
|
vim.g.noerrorbells = true
|
|
|
|
-- Interaction
|
|
vim.o.whichwrap = '<,>,[,],b,'
|
|
vim.o.background = 'dark'
|
|
vim.o.backspace = 'indent,eol,start'
|
|
vim.o.termguicolors = true
|
|
vim.o.mouse = 'a'
|
|
|
|
-- File Handling
|
|
vim.o.autoread = true
|
|
vim.g.nobackup = true
|
|
vim.g.nowb = true
|
|
vim.g.noswapfile = true
|
|
|
|
|
|
-- Top buffer line
|
|
require'bufferline'.setup({
|
|
options = {
|
|
numbers = "ordinal",
|
|
number_style = "superscript"
|
|
}
|
|
})
|
|
|
|
-- These commands will navigate through buffers in order regardless of which mode you are using
|
|
-- e.g. if you change the order of buffers :bnext and :bprevious will not respect the custom ordering
|
|
vim.api.nvim_set_keymap('', '<F2>', ':BufferLineCyclePrev<CR>', {})
|
|
vim.api.nvim_set_keymap('', '<F3>', ':BufferLineCycleNext<CR>', {})
|
|
|
|
-- These commands will move the current buffer backwards or forwards in the bufferline
|
|
vim.api.nvim_set_keymap('', '<C-F2>', ':BufferLineMovePrev<CR>', {})
|
|
vim.api.nvim_set_keymap('', '<C-F3>', ':BufferLineMoveNext<CR>', {})
|
|
|
|
-- " These commands will sort buffers by directory, language, or a custom criteria
|
|
-- nnorevim.api.nvim_set_keymap <silent>be :BufferLineSortByExtension<CR>
|
|
-- nnorevim.api.nvim_set_keymap <silent>bd :BufferLineSortByDirectory<CR>
|
|
-- nnorevim.api.nvim_set_keymap <silent><F4> :lua require'bufferline'.sort_buffers_by(function (buf_a, buf_b) return buf_a.id < buf_b.id end)<CR>
|