Skip to content

Commit 2c9e430

Browse files
committed
adding updated keybindings
1 parent ee1274d commit 2c9e430

2 files changed

Lines changed: 51 additions & 0 deletions

File tree

keybindings/vim-keybindings

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
" Keybinding for my code-runner
2+
nnoremap rr :w<cr> :FloatermNew --title=code-runner --height=0.6 --width=0.7 --autoclose=0 run % <cr>
3+
nnoremap <expr> ff expand('%:t') ==? 'fish' ? ":FloatermToggle <cr>" : execute(':ls! hR') ==? "" ? ":FloatermNew --title=code-runner --height=0.6 --width=0.7 <cr> <C-\><C-n>:FloatermToggle <cr>:w <cr>:FloatermSend --title=code-runner run % <cr>:FloatermToggle <cr>" : ":w <cr>:FloatermSend --title=code-runner run % <cr>:FloatermToggle <cr>"
4+
tnoremap ff <C-\><C-n>:FloatermToggle <cr>
5+
6+
7+
" INSTALL THE FLOATERM PLUGIN
8+
call plug#begin('~/.vim/plugged')
9+
10+
" Floating Terminal
11+
Plug 'voldikss/vim-floaterm'
12+
13+
call plug#end()

keybindings/vscode-keybindings

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// Replace only the key argument with your choice of key-combination
2+
3+
// Switch focus between terminal and editor
4+
// Start
5+
{
6+
"key": "alt+space",
7+
"command": "workbench.action.terminal.newWithCwd",
8+
"args": {
9+
"cwd": "${fileDirname}"
10+
},
11+
"when": "!terminalIsOpen"
12+
},
13+
{
14+
"key": "alt+space",
15+
"command": "terminal.focus",
16+
"when": "terminalIsOpen && !terminalFocus"
17+
},
18+
{
19+
"key": "alt+space",
20+
"command": "workbench.action.focusActiveEditorGroup",
21+
"when": "terminalIsOpen && terminalFocus"
22+
},
23+
// End
24+
25+
// My Code runner
26+
// Start
27+
{
28+
"key": "cmd+contextmenu",
29+
"command": "terminal.focus",
30+
"when": "!terminalFocus"
31+
},
32+
{
33+
"key": "cmd+contextmenu",
34+
"command": "workbench.action.terminal.sendSequence",
35+
"args": {"text": "run '${fileBasename}'\u000D"},
36+
"when": "terminalIsOpen && terminalFocus"
37+
}
38+
// End

0 commit comments

Comments
 (0)