From c80a54e42b52ce297f0f2f71af23c562832025c7 Mon Sep 17 00:00:00 2001 From: TheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com> Date: Fri, 24 Jan 2025 20:35:27 +0900 Subject: init --- ar/.config/NvChad/vscode/settings.vim | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 ar/.config/NvChad/vscode/settings.vim (limited to 'ar/.config/NvChad/vscode/settings.vim') diff --git a/ar/.config/NvChad/vscode/settings.vim b/ar/.config/NvChad/vscode/settings.vim new file mode 100644 index 0000000..c48a73c --- /dev/null +++ b/ar/.config/NvChad/vscode/settings.vim @@ -0,0 +1,49 @@ +function! s:closeOtherEditors() + call VSCodeNotify('workbench.action.closeEditorsInOtherGroups') + call VSCodeNotify('workbench.action.closeOtherEditors') +endfunction + +function! s:manageEditorSize(...) + let count = a:1 + let to = a:2 + for i in range(1, count ? count : 1) + call VSCodeNotify(to == 'increase' ? 'workbench.action.increaseViewSize' : 'workbench.action.decreaseViewSize') + endfor +endfunction + +command! -bang Only if == '!' | call closeOtherEditors() | else | call VSCodeNotify('workbench.action.joinAllGroups') | endif + +nnoremap = :call VSCodeNotify('workbench.action.evenEditorWidths') +xnoremap = :call VSCodeNotify('workbench.action.evenEditorWidths') +nnoremap _ :call VSCodeNotify('workbench.action.toggleEditorWidths') +xnoremap _ :call VSCodeNotify('workbench.action.toggleEditorWidths') + +" nnoremap > :call manageEditorSize(v:count, 'increase') +" xnoremap > :call manageEditorSize(v:count, 'increase') +" nnoremap + :call manageEditorSize(v:count, 'increase') +" xnoremap + :call manageEditorSize(v:count, 'increase') +" nnoremap < :call manageEditorSize(v:count, 'decrease') +" xnoremap < :call manageEditorSize(v:count, 'decrease') +" nnoremap - :call manageEditorSize(v:count, 'decrease') +" xnoremap - :call manageEditorSize(v:count, 'decrease') + +" Better Navigation +nnoremap :call VSCodeNotify('workbench.action.navigateDown') +xnoremap :call VSCodeNotify('workbench.action.navigateDown') +nnoremap :call VSCodeNotify('workbench.action.navigateUp') +xnoremap :call VSCodeNotify('workbench.action.navigateUp') +nnoremap :call VSCodeNotify('workbench.action.navigateLeft') +xnoremap :call VSCodeNotify('workbench.action.navigateLeft') +nnoremap :call VSCodeNotify('workbench.action.navigateRight') +xnoremap :call VSCodeNotify('workbench.action.navigateRight') + +" Bind C-/ to vscode commentary since calling from vscode produces double comments due to multiple cursors +xnoremap :call Comment() +nnoremap :call Comment() + +nnoremap _ :call VSCodeNotify('workbench.action.toggleEditorWidths') + +nnoremap :call VSCodeNotify('whichkey.show') +xnoremap :call VSCodeNotify('whichkey.show') + +" nnoremap :call VSCodeNotify('workbench.view.explorer') \ No newline at end of file -- cgit v1.2.3