From abee01369777da8411c813c2410eeb289270892a Mon Sep 17 00:00:00 2001 From: yannickreiss Date: Sun, 7 Apr 2024 08:44:51 +0200 Subject: [PATCH] Translated vanilla completely --- lua/plugconfig.lua | 13 +++++++++++++ lua/vanilla.lua | 11 +++++++++++ viml/plugconfig.vim | 44 -------------------------------------------- viml/vanilla.vim | 31 ------------------------------- 4 files changed, 24 insertions(+), 75 deletions(-) delete mode 100644 viml/vanilla.vim diff --git a/lua/plugconfig.lua b/lua/plugconfig.lua index 46236ca..e20aeaf 100644 --- a/lua/plugconfig.lua +++ b/lua/plugconfig.lua @@ -1,3 +1,15 @@ +-- Update function and call +function Update_Sys() + vim.cmd("Lazy sync") + vim.cmd("TSUpdate") +end + +vim.keymap.set("n", "", ":lua Update_Sys()") + +-- Bufstop +vim.keymap.set("n", "", ":bdelete") +vim.keymap.set("n", "", ":BufstopFast") + -- UltiSnips Configuration vim.g.UltiSnipsExpandTrigger = "" vim.g.UltiSnipsJumpForwardTrigger = "" @@ -7,6 +19,7 @@ vim.g.UltiSnipsSnippetDirectories = { "~/.config/nvim/UltiSnips" } -- NERDTree Config vim.g.NERDTreeShowHidden = 1 +vim.keymap.set("n", "", ":NERDTreeToggle") -- Lexima vim.g.lexima_enable_basic_rules = 1 diff --git a/lua/vanilla.lua b/lua/vanilla.lua index bedcc8a..1426a89 100644 --- a/lua/vanilla.lua +++ b/lua/vanilla.lua @@ -4,6 +4,12 @@ vim.cmd("filetype on") vim.cmd("filetype plugin on") vim.cmd("syntax on") +-- Spell +vim.opt.spell = true +vim.opt.spl = "en_us,de_de" +vim.opt.sps = "fast,timeout:100" + + -- Editor configuration vim.opt.number = true vim.opt.tabstop = 4 @@ -12,6 +18,8 @@ vim.opt.expandtab = true vim.opt.splitright = true vim.opt.splitbelow = true vim.g.mapleader = "," +vim.cmd("set clipboard+=unnamedplus") +vim.cmd("autocmd! CursorHold,CursorHoldI *.md write") -- GUI vim.opt.cursorline = true @@ -23,6 +31,9 @@ vim.opt.showmatch = true -- set color scheme vim.opt.termguicolors = true +vim.cmd("colorscheme slate") +vim.keymap.set("n", "", ":colo tokyonight-day") +vim.keymap.set("n", "", ":colo tokyonight-storm") vim.opt.mouse = "" diff --git a/viml/plugconfig.vim b/viml/plugconfig.vim index d4122d1..bde7d54 100644 --- a/viml/plugconfig.vim +++ b/viml/plugconfig.vim @@ -1,6 +1,3 @@ -" NERDTree remap -nmap :NERDTreeToggle - " Autoformat on save augroup FormatAutogroup autocmd! @@ -8,44 +5,3 @@ augroup FormatAutogroup augroup END autocmd BufWritePost *.v lua vim.lsp.buf.format({ async = false }) - -nnoremap BufferNext - -" update function and call -function Update_Sys() - Lazy sync - TSUpdate -endfunction - -nnoremap :call Update_Sys() - -" 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' - elseif l:filetype == 'markdown' - execute '!okular %&' - else - echo "Unsupported file type: " . l:filetype - endif -endfunction - -colorscheme vim-monokai-tasty - -nnoremap :call Build() -nnoremap :bdelete -nnoremap :BufstopFast diff --git a/viml/vanilla.vim b/viml/vanilla.vim deleted file mode 100644 index c2f566d..0000000 --- a/viml/vanilla.vim +++ /dev/null @@ -1,31 +0,0 @@ -" colorscheme vim-monokai-tasty -colorscheme slate - -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 :call Liten() -nnoremap :call Litde() - -" Theme -nnoremap :colo tokyonight-day -nnoremap :colo tokyonight-storm - -" Try transparent nvim -" highlight Normal guibg=none -" highlight NonText guibg=none -" highlight Normal ctermbg=none -" highlight NonText ctermbg=none - -" Autocmd safe on markdown -autocmd! CursorHold,CursorHoldI *.md write