nvim: setting organization

This commit is contained in:
PowerUser64 2021-11-02 21:23:44 -07:00
parent 30089fe6d1
commit 1e0a5f08cf

View file

@ -8,23 +8,25 @@ vim.cmd [[
set shiftwidth=3 set shiftwidth=3
set expandtab set expandtab
set smartindent set smartindent
" set foldmethod=indent "set foldmethod=indent
" set foldlevel=0 "set foldlevel=0
set undodir=~/.vim/undo
set undofile set undofile
set noswapfile set swapfile
set hlsearch set hlsearch
set hidden set hidden
set ignorecase set ignorecase
set smartcase set smartcase
set nowrap set nowrap
set linebreak set linebreak
" set guicursor= " always use the block cursor "set guicursor= " always use the block cursor
syntax enable syntax enable
set syntax=on set syntax=on
set redrawtime=1000 " max syntax highlight time " max syntax highlight time in ms
set redrawtime=200
set updatetime=300
set number "relativenumber set number "relativenumber
"autocmd InsertEnter * :set norelativenumber " Automatically toggle line numbers " Automatically toggle relative line numbers
"autocmd InsertEnter * :set norelativenumber
"autocmd InsertLeave * :set relativenumber "autocmd InsertLeave * :set relativenumber
set noerrorbells set noerrorbells
set encoding=UTF-8 set encoding=UTF-8
@ -32,14 +34,11 @@ vim.cmd [[
set mouse=a set mouse=a
set incsearch set incsearch
set scrolloff=5 set scrolloff=5
" set wildmenu "set wildmenu
" set wildmode=full "set wildmode=full
" TextEdit might fail if hidden is not set. " TextEdit might fail if hidden is not set.
set hidden set hidden
set cmdheight=1 " Give more space for displaying messages. set cmdheight=1 " Give more space for displaying messages.
" Having longer updatetime (default is 4000 ms = 4 s) leads to noticeable
" delays and poor user experience.
set updatetime=300
" Don't pass messages to |ins-completion-menu|. " Don't pass messages to |ins-completion-menu|.
set shortmess+=c set shortmess+=c
" Spell check! " Spell check!
@ -48,16 +47,13 @@ vim.cmd [[
autocmd Filetype gitcommit setlocal spell autocmd Filetype gitcommit setlocal spell
set showcmd set showcmd
set signcolumn=yes set signcolumn=yes
" disable spell check in help files
""" autocmd's
" Disable spell check in help files
autocmd FileType help setlocal nospell autocmd FileType help setlocal nospell
filetype plugin on filetype plugin on
" Macro for opening a new terminal with spell check off " Automatically disable line numbers when in terminal mode
command! Term tabnew | setlocal nospell | term autocmd TermOpen * setlocal nospell nonumber norelativenumber
autocmd FileType help setlocal nospell
" test whitespace ->
" more test whitespace ->
" Indented text
" even more test whitespace ->
""" Key bindings """ Key bindings
let mapleader = " " let mapleader = " "
@ -75,6 +71,9 @@ vim.cmd [[
command! WQa wqa command! WQa wqa
command! WQA wqa command! WQA wqa
" Macro for opening a new terminal
command! Term tabnew | term
" Press Alt h to toggle highlighting on/off, and show current value. " Press Alt h to toggle highlighting on/off, and show current value.
nnoremap <M-h> <cmd>noh<CR> nnoremap <M-h> <cmd>noh<CR>