organized settings and added a note to convert it to lua
This commit is contained in:
parent
e852fd492a
commit
4ae0d9e379
1 changed files with 75 additions and 114 deletions
|
@ -1,119 +1,80 @@
|
|||
vim.g.mapleader = " "
|
||||
|
||||
-- TODO: translate this to lua
|
||||
vim.cmd [[
|
||||
set suffixes+=.aux,.bbl,.blg,.brf,.cb,.dvi,.idx,.ilg,.ind,.inx,.jpg,.log,.out,.png,.toc
|
||||
set suffixes-=.h
|
||||
set suffixes-=.obj
|
||||
""" Settings
|
||||
set suffixes+=.aux,.bbl,.blg,.brf,.cb,.dvi,.idx,.ilg,.ind,.inx,.jpg,.log,.out,.png,.toc
|
||||
set suffixes-=.h
|
||||
set suffixes-=.obj
|
||||
set tabstop=3 softtabstop=3
|
||||
set shiftwidth=3
|
||||
set expandtab
|
||||
set smartindent
|
||||
" set foldmethod=indent
|
||||
" set foldlevel=0
|
||||
set undodir=~/.vim/undo
|
||||
set undofile
|
||||
set noswapfile
|
||||
set hlsearch
|
||||
set hidden
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set wrap
|
||||
set linebreak
|
||||
" set guicursor= " always use the block cursor
|
||||
syntax on
|
||||
set redrawtime=1000 " max syntax highlight time
|
||||
set number relativenumber
|
||||
set noerrorbells
|
||||
set encoding=UTF-8
|
||||
set cursorline
|
||||
set mouse=a
|
||||
set incsearch
|
||||
set scrolloff=5
|
||||
" 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!
|
||||
set spelllang=en_us
|
||||
" spell check in git commits
|
||||
autocmd Filetype gitcommit setlocal spell
|
||||
set showcmd
|
||||
set signcolumn=yes
|
||||
" 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 ->
|
||||
|
||||
set tabstop=3 softtabstop=3
|
||||
set shiftwidth=3
|
||||
set expandtab
|
||||
set smartindent
|
||||
" set foldmethod=indent
|
||||
" set foldlevel=0
|
||||
|
||||
set undodir=~/.vim/undo
|
||||
set undofile
|
||||
set noswapfile
|
||||
|
||||
set guifont=SauceCodePro\ NF\ Regular
|
||||
|
||||
set hlsearch
|
||||
set hidden
|
||||
set ignorecase
|
||||
set smartcase
|
||||
set wrap
|
||||
set linebreak
|
||||
" set guicursor= " always use the block cursor
|
||||
syntax on
|
||||
set redrawtime=1000 " max syntax highlight time
|
||||
set number relativenumber
|
||||
set noerrorbells
|
||||
set encoding=UTF-8
|
||||
set cursorline
|
||||
set mouse=a
|
||||
set incsearch
|
||||
set scrolloff=5
|
||||
" 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!
|
||||
set spelllang=en_us
|
||||
" spell check in git commits
|
||||
autocmd Filetype gitcommit setlocal spell
|
||||
set showcmd
|
||||
set signcolumn=yes
|
||||
" 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 ->
|
||||
|
||||
" Key bindings
|
||||
" let mapleader = " "
|
||||
" *sigh*...
|
||||
command! Q q
|
||||
command! W w
|
||||
command! Wq wq
|
||||
command! WQ wq
|
||||
" nnoremap ; :
|
||||
" vnoremap ; :
|
||||
" Press Alt h to toggle highlighting on/off, and show current value.
|
||||
noremap <M-h> <cmd>set hlsearch! hlsearch?<CR>
|
||||
noremap <M-S> <cmd>set spell! spell?<CR>
|
||||
" Escape to enter normal mode in the terminal
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
" Replace with alt S
|
||||
nnoremap <M-s> :%s//g<Left><Left>
|
||||
" Wrapped line movement (hold ctrl to move like a word processor)
|
||||
nmap <C-h> h
|
||||
nmap <C-j> gj
|
||||
nmap <C-k> gk
|
||||
nmap <C-l> l
|
||||
" nmap <C-4> g$
|
||||
nmap <C>$ g$
|
||||
nmap <C-6> g^
|
||||
nmap <C-^> g^
|
||||
nmap <C-0> g^
|
||||
vmap <C-h> h
|
||||
vmap <C-j> gj
|
||||
vmap <C-k> gk
|
||||
vmap <C-l> l
|
||||
vmap <C-4> g$
|
||||
vmap <C>$ g$
|
||||
vmap <C-6> g^
|
||||
vmap <C-^> g^
|
||||
vmap <C-0> g^
|
||||
" " Hold ctrl to move between windows, shift to reorder the windows
|
||||
" nmap <C-h> <C-w>h
|
||||
" nmap <C-j> <C-w>j
|
||||
" nmap <C-k> <C-w>k
|
||||
" nmap <C-l> <C-w>l
|
||||
" nmap <C-H> <C-w>H
|
||||
" nmap <C-J> <C-w>J
|
||||
" nmap <C-K> <C-w>K
|
||||
" nmap <C-L> <C-w>L
|
||||
" " and for visual mode
|
||||
" vmap <C-h> <C-w>h
|
||||
" vmap <C-j> <C-w>j
|
||||
" vmap <C-k> <C-w>k
|
||||
" vmap <C-l> <C-w>l
|
||||
" vmap <C-H> <C-w>H
|
||||
" vmap <C-J> <C-w>J
|
||||
" vmap <C-K> <C-w>K
|
||||
" vmap <C-L> <C-w>L
|
||||
""" Key bindings
|
||||
let mapleader = " "
|
||||
" *sigh*...
|
||||
command! Q q
|
||||
command! W w
|
||||
command! Wq wq
|
||||
command! WQ wq
|
||||
" nnoremap ; :
|
||||
" vnoremap ; :
|
||||
" Press Alt h to toggle highlighting on/off, and show current value.
|
||||
noremap <M-h> <cmd>set hlsearch! hlsearch?<CR>
|
||||
noremap <M-S> <cmd>set spell! spell?<CR>
|
||||
" Escape to enter normal mode in the terminal
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
" Replace with alt S
|
||||
nnoremap <M-s> :%s//g<Left><Left>
|
||||
" Move lines around in visual mode with J and K
|
||||
vnoremap J <cmd>m '>+1<CR>gv=gv'
|
||||
vnoremap K <cmd>m '>+1<CR>gv=gv'
|
||||
|
||||
colorscheme slate
|
||||
]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue