nvim: init.vim: Miscellaneous improvements
Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
This commit is contained in:
parent
9e7dcba80a
commit
754f80a43e
1 changed files with 8 additions and 1 deletions
|
@ -107,12 +107,13 @@ set ruler " Show the line and column numbers of the cursor.
|
||||||
set number " Show the line numbers on the left side.
|
set number " Show the line numbers on the left side.
|
||||||
set formatoptions+=o " Continue comment marker in new lines.
|
set formatoptions+=o " Continue comment marker in new lines.
|
||||||
set formatoptions+=j " Delete comment character when joining commented lines
|
set formatoptions+=j " Delete comment character when joining commented lines
|
||||||
set textwidth=0 " Hard-wrap long lines as you type them.
|
set textwidth=80 " Hard-wrap long lines as you type them.
|
||||||
set softtabstop=4 " Finetunes the amount of white space to be added.
|
set softtabstop=4 " Finetunes the amount of white space to be added.
|
||||||
set tabstop=4 " Render TABs using this many spaces.
|
set tabstop=4 " Render TABs using this many spaces.
|
||||||
set shiftwidth=4 " Indentation amount for < and > commands.
|
set shiftwidth=4 " Indentation amount for < and > commands.
|
||||||
set smarttab " Indent with tabs, align with spaces.
|
set smarttab " Indent with tabs, align with spaces.
|
||||||
set expandtab " When on, uses space instead of tabs.
|
set expandtab " When on, uses space instead of tabs.
|
||||||
|
set autoindent " Copy indent from current line when starting a new line
|
||||||
set noerrorbells " No beeps.
|
set noerrorbells " No beeps.
|
||||||
set modeline " Enable modeline.
|
set modeline " Enable modeline.
|
||||||
set linespace=0 " Set line-spacing to minimum.
|
set linespace=0 " Set line-spacing to minimum.
|
||||||
|
@ -142,6 +143,7 @@ set termguicolors " Enable colors for terminal
|
||||||
set fileformat=unix
|
set fileformat=unix
|
||||||
|
|
||||||
set clipboard^=unnamed,unnamedplus
|
set clipboard^=unnamed,unnamedplus
|
||||||
|
set backspace=indent,eol,start
|
||||||
set completeopt=menu,noselect,preview,noinsert
|
set completeopt=menu,noselect,preview,noinsert
|
||||||
" Required for vim-workspace
|
" Required for vim-workspace
|
||||||
" See https://github.com/thaerkh/vim-workspace/issues/11
|
" See https://github.com/thaerkh/vim-workspace/issues/11
|
||||||
|
@ -408,6 +410,11 @@ let g:workspace_autosave_ignore = ['gitcommit', 'qf', 'nerdtree', 'tagbar']
|
||||||
autocmd BufRead,BufNewFile */gst-*/*.[ch] set et sw=2
|
autocmd BufRead,BufNewFile */gst-*/*.[ch] set et sw=2
|
||||||
autocmd BufRead,BufNewFile */gstreamer-*/*.[ch] set et sw=2
|
autocmd BufRead,BufNewFile */gstreamer-*/*.[ch] set et sw=2
|
||||||
autocmd BufRead,BufNewFile */pulseaudio/*.[ch] set et sw=4 tw=128
|
autocmd BufRead,BufNewFile */pulseaudio/*.[ch] set et sw=4 tw=128
|
||||||
|
" Configure expanding of tabs for various file types
|
||||||
|
au BufRead,BufNewFile *.py set expandtab
|
||||||
|
au BufRead,BufNewFile *.c set noexpandtab
|
||||||
|
au BufRead,BufNewFile *.h set noexpandtab
|
||||||
|
au BufRead,BufNewFile Makefile* set noexpandtab
|
||||||
" Spell Checking
|
" Spell Checking
|
||||||
autocmd BufRead,BufNewFile *.md,*.txt setlocal spell spelllang=en_uk
|
autocmd BufRead,BufNewFile *.md,*.txt setlocal spell spelllang=en_uk
|
||||||
" Automatically resize the window
|
" Automatically resize the window
|
||||||
|
|
Loading…
Reference in a new issue