From bdf61c179b41383b2a0955d3628d6c0648e2a69f Mon Sep 17 00:00:00 2001 From: Thomas Schmucker Date: Thu, 13 Jun 2024 17:26:45 +0200 Subject: Setze den Cursor in das 'richtige' Fenster bei Verwendung von Nerdtree --- nvim/autocmd.vim | 7 +------ nvim/ftplugin/vim.vim | 2 -- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'nvim') diff --git a/nvim/autocmd.vim b/nvim/autocmd.vim index 2b35834..5dda3b5 100644 --- a/nvim/autocmd.vim +++ b/nvim/autocmd.vim @@ -1,8 +1,3 @@ autocmd FileType html,css EmmetInstall - -" Start NERDTree when Vim is started without file arguments. -autocmd StdinReadPre * let s:std_in=1 -autocmd VimEnter * if argc() == 0 && !exists('s:std_in') | NERDTree | endif - -" Close the tab if NERDTree is the only window remaining in it. +autocmd VimEnter * NERDTree | wincmd p autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif diff --git a/nvim/ftplugin/vim.vim b/nvim/ftplugin/vim.vim index a67d39a..1054984 100644 --- a/nvim/ftplugin/vim.vim +++ b/nvim/ftplugin/vim.vim @@ -1,5 +1,3 @@ -lua vim.treesitter.start() - setlocal tabstop=2 setlocal softtabstop=2 setlocal shiftwidth=2 -- cgit v1.3