Initial commit
This commit is contained in:
72
init.vim
Normal file
72
init.vim
Normal file
@@ -0,0 +1,72 @@
|
||||
" General settings
|
||||
"
|
||||
|
||||
set nocompatible
|
||||
set bs=2 "set backspace to be able to delete previous characters
|
||||
let mapleader = "," "Set the leader from \ to ,
|
||||
|
||||
" Enable line numbering
|
||||
set number
|
||||
|
||||
" No word wrapping
|
||||
set wrap!
|
||||
|
||||
" Encoding is UTF-8
|
||||
|
||||
" Autosave all unsaved buffers when the window loses focus
|
||||
au FocusLost * :wa
|
||||
|
||||
" Set defaults for syntax highlight
|
||||
filetype off
|
||||
|
||||
" Set tab char to 4 spaces, not 8
|
||||
set tabstop=4
|
||||
|
||||
" Turn tabs into whitespaces
|
||||
set expandtab
|
||||
|
||||
" Indent width for autoindent, C friendly
|
||||
set shiftwidth=4
|
||||
|
||||
" Indent depends on filed
|
||||
filetype plugin indent on
|
||||
|
||||
"Turn on incremental search
|
||||
set incsearch
|
||||
set ignorecase
|
||||
set smartcase
|
||||
|
||||
"Informative statusline
|
||||
set statusline=%F%m%r%h%w\ [TYPE=%Y\ %{&ff}]\ [%02l:%02v\ (%p%%)\ %L\ Lines]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]
|
||||
set laststatus=2
|
||||
|
||||
" Beautify the look and feel
|
||||
syntax on
|
||||
|
||||
" always use the clipboard, instead of the internal * and + registers
|
||||
set clipboard+=unnamedplus
|
||||
|
||||
" Disable spell checking in terminal windows
|
||||
autocmd TermOpen * setlocal nospell nonumber norelativenumber
|
||||
|
||||
" Switch buffers with <TAB> and <S>-<TAB>
|
||||
nnoremap <silent> <tab> :if &modifiable && !&readonly && &modified <CR> :write<CR> :endif<CR>:bnext<CR>
|
||||
nnoremap <silent> <s-tab> :if &modifiable && !&readonly && &modified <CR> :write<CR> :endif<CR>:bprevious<CR>
|
||||
|
||||
" toggle folding in normal mode with <space>
|
||||
nnoremap <space> za
|
||||
nnoremap <S-space> zA
|
||||
|
||||
let &packpath = &runtimepath
|
||||
source ~/.config/nvim/plug.vim
|
||||
source ~/.config/nvim/gui.vim
|
||||
source ~/.config/nvim/latex.vim
|
||||
source ~/.config/nvim/markdown.vim
|
||||
source ~/.config/nvim/wiki.vim
|
||||
source ~/.config/nvim/rainbow.vim
|
||||
source ~/.config/nvim/neomake.vim
|
||||
source ~/.config/nvim/keymap.vim
|
||||
source ~/.config/nvim/timestamp.vim
|
||||
source ~/.config/nvim/ale.vim
|
||||
source ~/.config/nvim/html.vim
|
||||
source ~/.config/nvim/python.vim
|
||||
Reference in New Issue
Block a user