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 expandtab
set smartindent
" set foldmethod=indent
" set foldlevel=0
set undodir=~/.vim/undo
"set foldmethod=indent
"set foldlevel=0
set undofile
set noswapfile
set swapfile
set hlsearch
set hidden
set ignorecase
set smartcase
set nowrap
set linebreak
" set guicursor= " always use the block cursor
"set guicursor= " always use the block cursor
syntax enable
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
"autocmd InsertEnter * :set norelativenumber " Automatically toggle line numbers
" Automatically toggle relative line numbers
"autocmd InsertEnter * :set norelativenumber
"autocmd InsertLeave * :set relativenumber
set noerrorbells
set encoding=UTF-8
@ -32,14 +34,11 @@ vim.cmd [[
set mouse=a
set incsearch
set scrolloff=5
" set wildmenu
" set wildmode=full
"set wildmenu
"set wildmode=full
" TextEdit might fail if hidden is not set.
set hidden
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|.
set shortmess+=c
" Spell check!
@ -48,16 +47,13 @@ vim.cmd [[
autocmd Filetype gitcommit setlocal spell
set showcmd
set signcolumn=yes
" disable spell check in help files
""" autocmd's
" Disable spell check in help files
autocmd FileType help setlocal nospell
filetype plugin on
" Macro for opening a new terminal with spell check off
command! Term tabnew | setlocal nospell | term
autocmd FileType help setlocal nospell
" test whitespace ->
" more test whitespace ->
" Indented text
" even more test whitespace ->
" Automatically disable line numbers when in terminal mode
autocmd TermOpen * setlocal nospell nonumber norelativenumber
""" Key bindings
let mapleader = " "
@ -75,6 +71,9 @@ vim.cmd [[
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.
nnoremap <M-h> <cmd>noh<CR>