vim config

This commit is contained in:
grimhilt 2023-05-07 16:05:36 +02:00
parent b3df0f7bac
commit 090df02751
4 changed files with 29 additions and 41 deletions

23
.config/nvim/init.lua Normal file
View File

@ -0,0 +1,23 @@
vim.o.relativenumber = true
vim.o.number = true
vim.o.tabstop = 4
vim.o.softtabstop = 4
vim.o.shiftwidth = 4
vim.o.expandtab = true
vim.o.smartindent = true
--ignore case if pattern doesn't contain upper case
vim.o.ignorecase = true
vim.o.smartcase = true
--number of line to show around the cursor
vim.o.scrolloff = 8
--move line shortcut
vim.keymap.set({'n', 'i'}, '<M-j>', ':m +1<CR>', {noremap = true})
vim.keymap.set({'n', 'i'}, '<M-k>', ':m -2<CR>', {noremap = true})
vim.keymap.set('v', '<M-j>', ":m '>+1<CR>gv", {noremap = true})
vim.keymap.set('v', '<M-k>', ":m '<-2<CR>gv", {noremap = true})
--require('packer-plugins')

View File

@ -1,40 +0,0 @@
call plug#begin('~/.config/nvim/plugged')
Plug 'sonph/onehalf', { 'rtp': 'vim' }
Plug 'vifm/vifm.vim'
Plug 'preservim/nerdtree'
Plug 'airblade/vim-gitgutter'
Plug 'jiangmiao/auto-pairs'
"Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'sheerun/vim-polyglot'
Plug 'itchyny/lightline.vim'
call plug#end()
syntax on
colorscheme onehalfdark
" lightline
let g:lightline = {
\ 'colorscheme': 'onehalfdark',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename', 'modified' ] ]
\ },
\ 'component': {
\ 'helloworld': 'Hello, world!'
\ },
\ }
set number
set relativenumber
set tabstop=4 softtabstop=0
set shiftwidth=4
set expandtab
set smartindent
set ignorecase
set incsearch
set scrolloff=8
set noshowmode
"set colorcolumn=80

View File

@ -0,0 +1,4 @@
return require('packer').startup(function()
use 'wbthomason/packer.nvim'
--use 'sonph/onehalf'
end)

3
.gitignore vendored
View File

@ -1 +1,2 @@
.config/nvim/plugged plugged
*.bak