nvim/init.vim

68 lines
2.4 KiB
VimL
Raw Normal View History

2022-10-21 08:53:31 +00:00
" set termguicolors before lua config,
" as it can contain some theme stuff that
" checks for termguicolors
set termguicolors
2022-10-09 15:35:20 +00:00
" load main lua file with additional configs
lua require("initializer")
2022-10-05 19:22:26 +00:00
2022-10-19 13:11:04 +00:00
" highlight all .conf files as apache config (:])
2022-10-14 07:03:27 +00:00
autocmd BufEnter *.conf :setlocal filetype=apache
au BufNewFile,BufRead *.sls set filetype=sls.yaml
2022-10-06 12:01:05 +00:00
"nerdtree bindings
nnoremap <leader>n :NvimTreeFocus<CR>
nnoremap <C-t> :NvimTreeToggle<CR>
2022-10-05 19:22:26 +00:00
" nerdcommenter custom bindings
2022-12-03 18:41:39 +00:00
nmap <c-/> <plug>NERDCommenterToggle
vmap <c-/> <plug>NERDCommenterToggle
2022-10-05 19:22:26 +00:00
"theme configuration
2022-10-05 19:22:26 +00:00
syntax enable
2022-12-22 12:37:38 +00:00
colorscheme dracula
2022-10-05 19:22:26 +00:00
set splitright
set splitbelow
" indent/unindent with tab/shift-tab
nmap <Tab> >>
nmap <S-tab> <<
imap <S-Tab> <Esc><<i
vmap <Tab> >gv
vmap <S-Tab> <gv
" Find files using Telescope command-line sugar.
nnoremap <leader>ff <cmd>Telescope find_files<cr>
nnoremap <leader>fg <cmd>Telescope live_grep<cr>
nnoremap <leader>fb <cmd>Telescope buffers<cr>
nnoremap <leader>fh <cmd>Telescope help_tags<cr>
" general configs
set modeline
2022-10-06 12:01:05 +00:00
set encoding=UTF-8
2022-10-21 08:53:31 +00:00
set showmatch " show matching
set ignorecase " case insensitive
set mouse=v " middle-click paste with
set hlsearch " highlight search
2022-10-05 19:22:26 +00:00
set incsearch " incremental search
2022-10-21 08:53:31 +00:00
set tabstop=4 " number of columns occupied by a tab
2022-10-05 19:22:26 +00:00
set softtabstop=4 " see multiple spaces as tabstops so <BS> does the right thing
set expandtab " converts tabs to white space
set shiftwidth=4 " width for autoindents
set autoindent " indent a new line the same amount as the line just typed
set number " add line numbers
set relativenumber " add relative line numbers
2022-10-05 19:22:26 +00:00
set wildmode=longest,list " get bash-like tab completions
2022-10-10 05:23:47 +00:00
set cc=80 " set an 80 column border for good coding style
2022-10-05 19:22:26 +00:00
filetype plugin indent on "allow auto-indenting depending on file type
syntax on " syntax highlighting
2022-10-10 05:23:47 +00:00
"set mouse=a " enable mouse click
set clipboard+=unnamedplus " using system clipboard
2022-10-05 19:22:26 +00:00
filetype plugin on
set cursorline " highlight current cursorline
set ttyfast " Speed up scrolling in Vim
" set spell " enable spell check (may need to download language package)
2022-10-10 05:23:47 +00:00
set noswapfile " disable creating swap file
2022-10-05 19:22:26 +00:00
" set backupdir=~/.cache/vim " Directory to store backup files.