Lazy rewrite with additional configuration

This commit is contained in:
2023-12-08 11:36:26 +01:00
parent 6726b2f95b
commit 0110d8d801
14 changed files with 348 additions and 8954 deletions

View File

@@ -1,6 +0,0 @@
function Common()
endfunction
" load common macros for all Filetypes
autocmd BufEnter * :call Common()

46
viml/plugconfig.vim Normal file
View File

@@ -0,0 +1,46 @@
" NERDTree remap
nmap <C-e> :NERDTreeToggle<CR>
" Autoformat on save
augroup FormatAutogroup
autocmd!
autocmd BufWritePost * FormatWrite
augroup END
nnoremap <silent> <C-0> <Cmd>BufferNext<CR>
" update function and call
function Update_Sys()
Lazy sync
TSUpdate
endfunction
nnoremap <M-u> :call Update_Sys()<CR>
" Call build function
function! Build()
let l:filetype = &filetype
if l:filetype == 'c' || l:filetype == 'cpp' || l:filetype == 'h' || l:filetype == 'hpp'
execute 'make'
elseif l:filetype == 'py' || l:filetype == 'python'
execute '!python3 %'
elseif l:filetype == 'tex'
execute '!lualatex % < /dev/null'
elseif l:filetype == 'rs'
execute 'cargo run'
elseif l:filetype == 'S'
execute 'make'
elseif l:filetype == 'verilog'
execute 'verilator --binary %'
elseif l:filetype == 'rust'
execute 'cargo run'
else
echo "Unsupported file type: " . l:filetype
endif
endfunction
nnoremap <C-b> :call Build()<CR>
nnoremap <M-w> :bdelete<CR>
nnoremap <C-y> :b#<CR>

View File

@@ -1,33 +0,0 @@
" PLUGINS
call plug#begin('~/.vim/plugged')
Plug 'dense-analysis/ale'
Plug 'preservim/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tpope/vim-surround'
Plug 'SirVer/ultisnips'
Plug 'vim-airline/vim-airline'
Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'neovim/nvim-lspconfig'
Plug 'junegunn/fzf.vim'
Plug 'Valloric/YouCompleteMe'
Plug 'williamboman/mason.nvim'
Plug 'williamboman/mason-lspconfig.nvim'
Plug 'neovim/nvim-lspconfig'
Plug 'mfussenegger/nvim-dap'
Plug 'f-person/git-blame.nvim'
Plug 'mfussenegger/nvim-lint'
Plug 'lewis6991/gitsigns.nvim'
Plug 'p00f/nvim-ts-rainbow'
Plug 'cohama/lexima.vim'
Plug 'honza/vim-snippets'
Plug 'hrsh7th/nvim-cmp'
Plug 'hrsh7th/cmp-nvim-lsp'
Plug 'hrsh7th/cmp-nvim-lua'
Plug 'hrsh7th/cmp-nvim-lsp-signature-help'
Plug 'hrsh7th/cmp-vsnip'
Plug 'hrsh7th/cmp-path'
Plug 'hrsh7th/cmp-buffer'
Plug 'hrsh7th/vim-vsnip'
Plug 'ryanoasis/vim-devicons'
call plug#end()

36
viml/vanilla.vim Normal file
View File

@@ -0,0 +1,36 @@
set nocompatible
filetype on
filetype plugin on
syntax on
colorscheme vim-monokai-tasty
" open builtin terminal
function OpenTerm()
10 split
terminal
endfunction
nnoremap <C-t> :call OpenTerm()<CR>
set splitright
set splitbelow
set clipboard+=unnamedplus
" set spellcheck according to Filetype
autocmd VimEnter * set spell spelllang=en_us
function Litde()
set spell spelllang=de_de
endfunction
function Liten()
set spell spelllang=en_us
endfunction
nnoremap <M-e> :call Liten()<CR>
nnoremap <M-g> :call Litde()<CR>
" Theme
nnoremap <M-+> :colo tokyonight-day<CR>
nnoremap <M--> :colo tokyonight-night<CR>

File diff suppressed because it is too large Load Diff