mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
vimrc refactor and remove most vim opts from neovim
This commit is contained in:
parent
fd603cb09f
commit
4f6bd457a6
@ -1,2 +1,5 @@
|
|||||||
|
-- neovim specific sets (everything else in ~/.vimrc)
|
||||||
|
vim.opt.termguicolors=true
|
||||||
|
|
||||||
require("tstarr")
|
require("tstarr")
|
||||||
vim.cmd('source ~/.vimrc')
|
vim.cmd('source ~/.vimrc')
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
require("tstarr.set")
|
|
||||||
require("tstarr.packer")
|
require("tstarr.packer")
|
||||||
require("tstarr.which-key")
|
require("tstarr.which-key")
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
vim.opt.guicursor = ""
|
|
||||||
|
|
||||||
vim.opt.nu = true
|
|
||||||
vim.opt.relativenumber = true
|
|
||||||
|
|
||||||
vim.opt.errorbells = false
|
|
||||||
|
|
||||||
vim.opt.tabstop = 4
|
|
||||||
vim.opt.softtabstop = 4
|
|
||||||
vim.opt.shiftwidth = 4
|
|
||||||
vim.opt.expandtab = true
|
|
||||||
|
|
||||||
vim.opt.smartindent = true
|
|
||||||
|
|
||||||
vim.opt.wrap = false
|
|
||||||
|
|
||||||
vim.opt.swapfile = false
|
|
||||||
vim.opt.backup = false
|
|
||||||
vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir"
|
|
||||||
vim.opt.undofile = true
|
|
||||||
|
|
||||||
vim.opt.hlsearch = false
|
|
||||||
vim.opt.incsearch = true
|
|
||||||
|
|
||||||
vim.opt.termguicolors = true
|
|
||||||
|
|
||||||
vim.opt.scrolloff = 8
|
|
||||||
vim.opt.signcolumn = "yes"
|
|
||||||
vim.opt.isfname:append("@-@")
|
|
||||||
|
|
||||||
-- Give more space for displaying messages.
|
|
||||||
vim.opt.cmdheight = 1
|
|
||||||
|
|
||||||
-- Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
|
|
||||||
-- delays and poor user experience.
|
|
||||||
vim.opt.updatetime = 50
|
|
||||||
|
|
||||||
-- Don't pass messages to |ins-completion-menu|.
|
|
||||||
vim.opt.shortmess:append("c")
|
|
||||||
|
|
||||||
vim.g.mapleader = " "
|
|
||||||
|
|
||||||
vim.opt.colorcolumn = "80"
|
|
||||||
|
|
||||||
-- Open web links with default system application
|
|
||||||
vim.g.netrw_browsex_viewer="gio open"
|
|
@ -2,15 +2,35 @@
|
|||||||
" https://github.com/starr-dusT/dotfiles
|
" https://github.com/starr-dusT/dotfiles
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" general
|
" general
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
set autowrite " automatically write files on close
|
||||||
|
|
||||||
|
" tabs and spaces and stuff
|
||||||
|
set tabstop=4
|
||||||
|
set softtabstop=4
|
||||||
|
set shiftwidth=4
|
||||||
|
set expandtab
|
||||||
|
|
||||||
|
" undos
|
||||||
|
set undodir="~/.vim/undodir"
|
||||||
|
set undofile
|
||||||
|
|
||||||
|
" map leader to Space
|
||||||
|
let mapleader = " "
|
||||||
|
|
||||||
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
" ui
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
syntax enable
|
syntax enable
|
||||||
set number
|
set number
|
||||||
set colorcolumn=79
|
set colorcolumn=79
|
||||||
set autowrite " automatically write files on close
|
set updatetime=50
|
||||||
|
set scrolloff=8
|
||||||
let mapleader = " " " map leader to Space
|
set smartindent
|
||||||
|
set incsearch " hilight search matches while typing
|
||||||
|
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
" wildmenu
|
" wildmenu
|
||||||
@ -60,6 +80,9 @@ map <leader>md :delmarks A-Z0-9 <cr> " clear marks
|
|||||||
" misc keys
|
" misc keys
|
||||||
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
" open help with word under cursor
|
||||||
|
map <leader>oh :execute "help " . expand("<cword>")<CR>
|
||||||
|
|
||||||
" move between splits with hjkl
|
" move between splits with hjkl
|
||||||
map <C-j> <C-W>j
|
map <C-j> <C-W>j
|
||||||
map <C-k> <C-W>k
|
map <C-k> <C-W>k
|
||||||
@ -93,7 +116,7 @@ nnoremap <down> <C-x>
|
|||||||
" display and select from a list of marks and jumps
|
" display and select from a list of marks and jumps
|
||||||
" https://vi.stackexchange.com/a/42965
|
" https://vi.stackexchange.com/a/42965
|
||||||
"
|
"
|
||||||
function ListSelect(command, jump)
|
function! ListSelect(command, jump)
|
||||||
execute a:command
|
execute a:command
|
||||||
echohl Question
|
echohl Question
|
||||||
echo "Enter mark (ESC to cancel): "
|
echo "Enter mark (ESC to cancel): "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user