From 6abb9e7d00f08ab2016b50b7f871f94e01fe771b Mon Sep 17 00:00:00 2001 From: lightofshadow Date: Thu, 2 Oct 2025 19:33:41 +0000 Subject: [PATCH] Better splits and other crap --- init.vim | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/init.vim b/init.vim index dce8d7f..2972851 100644 --- a/init.vim +++ b/init.vim @@ -8,6 +8,9 @@ set ts=4 sw=4 "gets rid of --INSERT-- useful bc of lighline" set noshowmode set mouse=a +"splits" +set splitright +set splitbelow call plug#begin() "file explorer" @@ -27,9 +30,10 @@ call plug#end() let $NVIM_TUI_ENABLE_TRUE_COLOR=1 -" Start NERDTree. If a file is specified, move the cursor to its window. +" Start NERDTree fullscreen if no file specified, otherwise open in split autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif +autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | execute 'NERDTree' | only | endif +autocmd VimEnter * if argc() > 0 || exists("s:std_in") | NERDTree | wincmd p | endif autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif nnoremap n :NERDTreeFocus @@ -38,15 +42,15 @@ let g:NERDTreeGitStatusWithFlags = 1 "let g:WebDevIconsUnicodeDecorateFolderNodes = 1 "let g:NERDTreeGitStatusNodeColorization = 1 "let g:NERDTreeColorMapCustom = { - "\ "Staged" : "#0ee375", - "\ "Modified" : "#d9bf91", - "\ "Renamed" : "#51C9FC", - "\ "Untracked" : "#FCE77C", - "\ "Unmerged" : "#FC51E6", - "\ "Dirty" : "#FFBD61", - "\ "Clean" : "#87939A", - "\ "Ignored" : "#808080" - "\ } + "\ "Staged" : "#0ee375", + "\ "Modified" : "#d9bf91", + "\ "Renamed" : "#51C9FC", + "\ "Untracked" : "#FCE77C", + "\ "Unmerged" : "#FC51E6", + "\ "Dirty" : "#FFBD61", + "\ "Clean" : "#87939A", + "\ "Ignored" : "#808080" + "\ } let g:NERDTreeIgnore = ['^node_modules$'] @@ -62,7 +66,7 @@ lua << EOF require'nvim-treesitter.configs'.setup { -- Install parsers for languages you use ensure_installed = { "c", "cpp", "python", "lua", "vim", "go", "html", "css", "javascript"}, - + -- Install all maintained parsers -- ensure_installed = "all", @@ -71,12 +75,12 @@ require'nvim-treesitter.configs'.setup { enable = true, additional_vim_regex_highlighting = false, }, - + -- Indentation based on treesitter (experimental) indent = { enable = true }, - + -- Incremental selection based on the syntax tree incremental_selection = { enable = true, @@ -90,4 +94,4 @@ require'nvim-treesitter.configs'.setup { } require('Comment').setup() -EOF +EOF \ No newline at end of file