No video

Getting Started with Vim in Visual Studio Code

  Рет қаралды 186,602

Suboptimal Engineer

Suboptimal Engineer

Күн бұрын

In this developer productivity video, I go over why you should use Vim commands in VS Code and help you get started with the Vim extension. I also go over my Vim coding workflow.
📖 Code - github.com/Sub...
🐦 Twitter - / suboptimaleng
💻 GitHub - github.com/Sub...
🌎 Website - suboptimaleng.com
== [ Timestamps ] ==
00:00 Intro
00:47 Why Vim?
01:25 Vim Use Case
03:54 Normal Mode Philosophy
04:30 Vim Setup in VS Code
07:30 Outro
== [ Tags ] ==
#suboptimal #vscode #vim

Пікірлер: 259
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Hello friends, I'm now on Twitter 🐦 twitter.com/SuboptimalEng
@Tantandev
@Tantandev 3 жыл бұрын
When you learn Vim you never want to edit code without it, it's so incredibly efficient and ergonomic
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
❌ Impossible 🔥 Vimpossible
@Tantandev
@Tantandev 3 жыл бұрын
@@SuboptimalEng haha never heard that one :)
@Dorbellprod
@Dorbellprod 2 жыл бұрын
Tantan... real??
@Tantandev
@Tantandev 2 жыл бұрын
@@Dorbellprod it's a me! Hi Dorbell!
@BrianGwaltney
@BrianGwaltney Жыл бұрын
Another simpler way to enable tabs: Go to the normal keybinding as you show in the video and right click on it. Select the "Change When Expression" and remove the !editorReadonly option. Same for outdent and shift tab.
@atalatal
@atalatal Жыл бұрын
Won't that interfere with other things. Like reading a git change.
@sanyamjha5796
@sanyamjha5796 2 жыл бұрын
Having switched from mac to pc, it takes a lot of effort to map all the keys and commands, especially with the home, end, page up and down keys. So having keybindings like Vim is quite "universal" and definitely helps.
@Ikram-Hussain
@Ikram-Hussain 2 жыл бұрын
do you know which theme he used?
@liggodoggo998
@liggodoggo998 Жыл бұрын
​@@Ikram-Hussainlooks like gruvbox
@RawkHawkRockin
@RawkHawkRockin 2 жыл бұрын
I've been wanting to improve my workflow for a while now and reduce the mouse and the arrow keys usage within VSCode. I've always known about vim but never tried to learn. There's for sure a lot of material online, one can easily get lost, but I think I have found the perfect channel for productivity and workflow tips, to get me jump started. I have already watched some of your vids and will do more, you explain in a clear way and showcase common use cases where ergonomics can be optimized, thanks for sharing :)
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Appreciate the comment Hawk! Glad my style of videos helped you get started with Vim ☺️
@GoogleUser-uv9bo
@GoogleUser-uv9bo Жыл бұрын
Vim helped me to relieve my wrist pain alot. && it also follows atomic habits temptation bundling!!!
@hemanthkotagiri8865
@hemanthkotagiri8865 3 жыл бұрын
It's not the case that Vim doesn't have the tab to indent feature, it's just that the keybinding is different. Visually select some text and Use the ">" or "
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Oh interesting, I did not know that. Thanks for explaining!
@SisiraSomaratne
@SisiraSomaratne 3 жыл бұрын
That's very nice! But how can we do 2 or 3 tabs? In that way after one tab selection disappears.
@hemanthkotagiri8865
@hemanthkotagiri8865 3 жыл бұрын
@@SisiraSomaratne There's a neat little trick for that. Say, you know how many tab overs you want to have. You can simply do n> or n< where n is the number of tab overs you want to. The other trick is, you can remap the key in your vimrc or init.vim so as to press "gv"(without quotes) as soon as you press > or
@SisiraSomaratne
@SisiraSomaratne 3 жыл бұрын
@@hemanthkotagiri8865 Oh! Again the Vim basic! Thanks.
@DragonKidPlaysMC
@DragonKidPlaysMC 3 жыл бұрын
It doesn’t work for me. However pressing shift before pressing < or > does the trick
@channalbert
@channalbert 3 жыл бұрын
I don't know if this will work for everyone, but if you really want fluidity between normal and insert mode, the fastest thing is probably to remap (through iOS, Linux or Windows config files) the keys "Esc" to "Caps Lock" and vice versa (since most of us don't really use Caps Lock not even once a month but Esc is one of the most used keys if you use vim keystrokes)
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
I remapped Caps Lock to CTRL for that utility 🦾
@channalbert
@channalbert 3 жыл бұрын
@@SuboptimalEng Oh, I see, emacs style 👍 #respect
@leondu
@leondu 2 жыл бұрын
@@SuboptimalEng FWIW, I switched `Esc` and `CapLock`, `Win` and `Ctrl`, and things are working quite smoothly.
@LocalTrashyt
@LocalTrashyt Жыл бұрын
I was thinking the same but I can seem to right caps lock the right way to do it
@conradmbugua9098
@conradmbugua9098 Жыл бұрын
I remapped mine to "jk"
@RahulPandeyrkp
@RahulPandeyrkp 3 жыл бұрын
Sounds like setting up Vim is pretty straightforward, I'll need to try it. The defaults are just so ingrained though...
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Do it for the ergonomics 👀
@hemanthkotagiri8865
@hemanthkotagiri8865 3 жыл бұрын
5:35 "The only way you can enter vim mode is by pressing escape". I don't understand why you call it the vim mode rather than normal mode, but you can enter into normal mode from insert mode using ctrl + c (C_c) or even ctrl + [. I use these two all the time.
@klimmesil9585
@klimmesil9585 2 жыл бұрын
Most vim users use escape on caps lock. I use it and now I yell very hard and high when someone doesn't bind caps lock onto escape (my information source is my teacher, and stack overflow so don't take it for granted haha)
@hemanthkotagiri8865
@hemanthkotagiri8865 2 жыл бұрын
@@klimmesil9585 i bound escape to jk. No kidding, there's a tone of people who do this their own way. But, my comment was originally intended to clarify that "escape key is not the only way you enter into normal mode" - as the dude states otherwise in his video.
@nekusakuraba4000
@nekusakuraba4000 2 жыл бұрын
Yeah! I use have Caps lock bound to LCtrl, so I can just press "Caps + [" and I can enter normal mode
@jabuxas
@jabuxas 2 жыл бұрын
@@klimmesil9585 how did you set caps in vim.insertModeKeyBindings? I use caps instead of Esc in my regular config of vim but don't know how I should set it here
@sainathsingineedi2922
@sainathsingineedi2922 3 жыл бұрын
I remapped ii to esc and thanks for that tip.
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
🔥
@Mersal-uj5nh
@Mersal-uj5nh 3 жыл бұрын
Your channel looks great for frontend developers. Productivity+Tailwind+Vue=🔥❤️
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
I’m slowly getting into TypeScript (and GraphQL) as well 😛
@shawnbeans7389
@shawnbeans7389 2 жыл бұрын
thanks for leaving your configuration in the description
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
How else can I up my stars on GitHub 😉
@shawnbeans7389
@shawnbeans7389 2 жыл бұрын
@@SuboptimalEng lol i forgot to do that ill go do it rn :)
@isaacdouglas1119
@isaacdouglas1119 3 жыл бұрын
This was helpful for me, thank you. Personally, I prefer to not add tabs in normal mode because I prefer that only insert mode has the potential to augment the code.
@nihancj
@nihancj 2 жыл бұрын
I don't want to edit my code in normal mode but I do want to add/remove tabs on multiple lines when I'm on visual mode. The only way to do this is by enabling the option to use tabs in normal mode.
@Yuna_Maxwell
@Yuna_Maxwell 2 жыл бұрын
@@nihancj just do ">"
@wesleytaylor-rendal5648
@wesleytaylor-rendal5648 2 жыл бұрын
suboptimal is the right name. When you didnt use %. I died inside
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
😂
@NatePerdomo
@NatePerdomo 6 ай бұрын
Copy the JSON additions below. To access settings.json: CMD + Shift + P then type "Open User Settings (JSON)" To access keybindings.json: Open Keyboard Shortcuts editor and select the Open Keyboard Shortcuts (JSON) button on the right of the editor title bar. or CMD + Shift + P then type "Open Keyboard Shortcuts (JSON)" settings.json: "vim.insertModeKeyBindings": [ { "before": ["k", "j"], "after":[""] } ], ~~~~~~~~~~~~~~~~~~~~~ keybindings.json: { "key": "tab", "command": "tab", "when": "editorTextFocus && !editorTabMovesFocus" }, { "key": "shift+tab", "command": "outdent", "when": "editorTextFocus && !editorTabMovesFocus" }
@SuboptimalEng
@SuboptimalEng 6 ай бұрын
Thanks for this!
@s1dev
@s1dev 3 жыл бұрын
Could you make a video on your vim setup? (more vim related content) I think its really good, as you have a better experience with vim.
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
I definitely plan to do more videos related to Vim and VSCode next year 💪
@immeatom
@immeatom 3 жыл бұрын
Just found this channel. So cool!
@drewberchtolzthofen886
@drewberchtolzthofen886 2 ай бұрын
vim is essential for keeping yourself in focus, while typing
@dominikm1457
@dominikm1457 3 жыл бұрын
Hi, just found your channel today! Really like your videos, subscribed.
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
More videos coming out 🔜
@dominikm1457
@dominikm1457 3 жыл бұрын
@@SuboptimalEng Awesome, looking forward to it!
@codewithtonny8176
@codewithtonny8176 3 жыл бұрын
hello thank you so much for this it actually incresed my productivity
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
🦾
@Ken_Machine-iu8je
@Ken_Machine-iu8je 3 ай бұрын
Having mapped k j to esc to enter normal mode from insert mode, then how do u type k j as characters in insert mode?
@SuboptimalEng
@SuboptimalEng 3 ай бұрын
You can set a time limit so that if you type the characters together slowly, the command does not get run and instead the characters get written.
@tomaszgora4353
@tomaszgora4353 2 ай бұрын
You can apply when conditions to bindings in the json. Read the docs i.e "when": "inputFocus && vim.mode == 'Normal'". I have bindings remapped and conditioned per mode i.e leader leader to enter visual line (V). Currently building new profile to fit new workflows trained on nvim :)
@RTCDigitalS
@RTCDigitalS Жыл бұрын
nice vid, also learned outro was a thing!
@Sovralin
@Sovralin 7 ай бұрын
Installed Vim today; let's see how much time before I learn it well enough. Gratitude.
@SuboptimalEng
@SuboptimalEng 7 ай бұрын
You have started on a great journey 🎯
@joenguyen8204
@joenguyen8204 3 жыл бұрын
Thanks, we need another video please more on vim tutorial
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Will do, in 2021!
@diggee172
@diggee172 2 жыл бұрын
Great video. Good information with explanations at a nice pace. Too many KZfaq “so-called tutorials” simply show stuff without adequate explanations.
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Thanks, I’m glad you appreciate the “why vim” explanation!
@jongeduard
@jongeduard Жыл бұрын
3:10 I was really hoping you were going to type: dat Does exactly wat you did. Deletes the entire XML tag in 3 very simple key presses. It is a text object in Vim.
@castrowicho
@castrowicho 3 жыл бұрын
Great video! Subscribed.
@yogxoth1959
@yogxoth1959 3 жыл бұрын
Hey man, hoping you can help me. Do you know how I can quickly navigate the CTRL+SHIFT+F "search in files" mode with VSCodeVim? And also how to go back to the editor window from there? Thank you.
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
You can press CTRL+b to close the left file search section. I still haven’t found a way to explore file search with Vim in VS Code unfortunately 🥲
@yogxoth1959
@yogxoth1959 3 жыл бұрын
@@SuboptimalEng Well, luckily I found a way to do it just an hour ago! Put this in your keybindings.json: { "key": "ctrl+j", "command": "search.action.focusNextSearchResult", "when": "hasSearchResult || inSearchEditor" }, { "key": "ctrl+k", "command": "search.action.focusPreviousSearchResult", "when": "hasSearchResult || inSearchEditor" }, { "key": "ctrl+e", "command": "workbench.action.focusActiveEditorGroup", "when": "!editorFocus" } Then you can use CTRL+J or K for going up and down the search results, and CTRL+E for focusing the editor again. Have a nice weekend! 😊
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
@@yogxoth1959 OMG nice! (Pinned the comment for others.)
@goncaloazevedo9822
@goncaloazevedo9822 2 жыл бұрын
@@SuboptimalEng i used f and it works wonders. Those are the defaults from telescope plugin in nivm. So handy and doesnt clash with any default keynaps. The leader key open up a new section for keymaps!! Edit: oh, in VSCode since there is no distinction between normal and insert mode this might be kind of a pain for escape characters actually :/
@ArkFreestyle
@ArkFreestyle 2 жыл бұрын
Thanks for sharing that tabbing in normal mode fix! How did you even figure that out? I noticed it stops tab from working with vscode snippets though, so disabling it :(
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Thanks! What is your issue with VS Code snippets? I put cmd j/k as keybindings to traverse VS Code suggestions.
@ArkFreestyle
@ArkFreestyle 2 жыл бұрын
@@SuboptimalEng ah, didn't realize I needed an additional keybinding. The issue was just that I could no longer tab through the snippets. Thanks for the quick response! I'll give it a shot.
@artist6000ish
@artist6000ish 3 жыл бұрын
I *was* excited to watch this. When it started with "Why VIM", and spent more time than I thought necessary to talk about why VIM is a good thing, I thought to myself, "Okay, so this is not about how to use VIM in VS-Code. This is for VS Code users who don't know VIM, and this explains to them why VIM is a good thing". So I thought, okay, well, that's not me. I know VIM pretty well, so I don't need to be told why VIM is good, but that's fine. I can just sit through that part to see if there's anything more. But the next thing dude talks about is, after installation, about remapping keys to go in and out of VIM mode. What? What is "VIM Mode"? VIM is already overloaded with modes.. command mode, insert mode, visual mode, select mode, ex-mode, .. But now we have VIM mode. As a VIM user, I don't know what that means. But this video is not for VIM users. It's for those who don't know VIM clearly -- otherwise why have a "Why VIM" section? How is someone who doesn't know VIM going to understand what "VIM Mode" is? I am guessing that what's going on is that Visual Studio code is, by default, in "notepad" mode where you can just type at any time. And the extension doesn't change that. You still start in that mode, and you have to do something to enable VIM for that session. I think. I'm guessing. Why not actually say that first before talking about how the keys need to be remapped. Show what's there by default and how it works.. and then say "ahh, but that part's a pain. here's how to fix it". First rule of presentation when you're showing someone a better way to do something, show them the problem without talking about the solution so they can appreciate the problem with you, then reveal, "Ahhh.. but this is what you can do to fix that!". Cmon dude.
@DavidGarcia-sb9kc
@DavidGarcia-sb9kc 4 ай бұрын
Thank you for this informative video! I'm trying to figure out how to change the "vim.insertModeKeyBindings" to use k,j. I'm new to using VSC and also VIM. Any help would be appreciated!
@sophiaonyoutube
@sophiaonyoutube Жыл бұрын
this is very helpful. thank you!
@bryanstark324
@bryanstark324 3 жыл бұрын
I like the subject here but the where did you find the "keybindings.json" and can you share your settings with us?
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Cmd + Shift + P -> start typing keybindings and you should see it appear My settings are on my Github under the Dotfiles repository 😇
@jcruz6888
@jcruz6888 2 жыл бұрын
Very good point about the ergonomics
@danielratiu4318
@danielratiu4318 2 ай бұрын
As for using Esc to enter visual, I think some default key binding should not change because one might connect to some remote machines, and access vim there and that would make work a hell ( because of muscle memory ). My 2 cents.
@SuboptimalEng
@SuboptimalEng 2 ай бұрын
That’s an interesting point. It’s possible that in some cases, keeping it as ESC is better.
@SajadJalilian
@SajadJalilian 2 жыл бұрын
You can swap your caps-lock with escape in your preferred OS. It saves alo of distance
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
That’s a good choice as well!
@HeyNoah
@HeyNoah 2 жыл бұрын
Thanks for the vid! Super cool! Curious, what syntax theme are you using?
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Thanks Noah! I usually switch between GitHub dark, Gruvbox, and Gruvbox material themes.
@rudranarayanboitei6332
@rudranarayanboitei6332 4 ай бұрын
Liked and subscribed ❤
@bennedictbyy
@bennedictbyy 3 жыл бұрын
Great video. May I ask what key stroke overlay are you using?
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Thanks! I’m using KeyCastr 🦾
@eaman11
@eaman11 Жыл бұрын
Usually you remap in your OS [CAPS LOCK] to [TAB]: you use TAB so much that pretty soon the TAB key is broken, also CAPS LOCK is more comfortable as it's on the main key line.
@Swedishnbkongu
@Swedishnbkongu 3 жыл бұрын
Comment for the algorithm
@sylvanfranklin6904
@sylvanfranklin6904 3 жыл бұрын
keep up the work small coding channel
@akashno3542
@akashno3542 Жыл бұрын
what plugin do you use for the screencast while typing . i mean the key's showing the monitor when you type something
@workingguy3166
@workingguy3166 Жыл бұрын
i'm using a 60% keyboard and it compromises on the arrow keys, i can switch my alt command /? and ctrl key out with the up down left right arrow keys, with vim i don't need to sacrifice on that and best part is i can now access the ~ key, before i can only do `
@thehaptiK
@thehaptiK 2 жыл бұрын
this got me going. thanks.
@literallyshane4306
@literallyshane4306 Жыл бұрын
great video, thanks mate
@ayoolao.5865
@ayoolao.5865 2 жыл бұрын
In vscodevim, You know whenever you go to a line and hit ci' you delete whatever is inside the single quotes and you are left into insert mode. This works regardless of your cursor position on the row. Well how can I do the same with parentheses or curly brackets because currently, this works only if my cursor it at the opening bracket or between both. Example: a = (1234,123) If I want to change inside the parentheses I would go to the line, f(ci( Whereas if it was surrounded by quotes it would work from any column on the row. How can I do it with other text objects without remapping keys? Thanks
@kkrizzz
@kkrizzz 9 ай бұрын
Commet for the algo, thanks for the content!
@drftls
@drftls Жыл бұрын
Great vid, thanks
@nevil2151
@nevil2151 Жыл бұрын
how did you do the multi-cursor thing at 0:27 ?
@joem8251
@joem8251 3 жыл бұрын
If I remap Tab I can't use it for intellisense. Is there a way to only remap Tab based on if intellisense is active or another solution to that issue?
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
You can also select intellisense suggestions with the enter key.
@chatreeK
@chatreeK Жыл бұрын
I cannot open setting like you 😢 why do it not work? 😂 I only see “Preferences: Open Settings(UI)”
@huyoken7953
@huyoken7953 9 ай бұрын
Why did you not use 12j??????
@yogitgarg9644
@yogitgarg9644 2 жыл бұрын
NIce video! Just to make it easy, you can toggle screencast mode in visual studio code rather than using another software for that. It's really good try it!
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Thanks for the tip Yogit!
@zeppelin0110
@zeppelin0110 2 жыл бұрын
I think the best approach to entering normal mode from insert mode is to remap CAPS LOCK to Escape and the other way around.
@muhammadraza7231
@muhammadraza7231 2 жыл бұрын
Yeah i do that with the help of karabiner :)
@MrJesterboi
@MrJesterboi Жыл бұрын
Hi does anyone know how to get to the vim settings json or were those vim settings manually added there? Thanks!
@NewBlueType
@NewBlueType 3 жыл бұрын
I can't find the vim settings inside the settings.json file
@anshul9856
@anshul9856 3 жыл бұрын
Thanks a lot for this video
@user-pj4iq5nl1m
@user-pj4iq5nl1m Жыл бұрын
Hey, would you mind telling us what VSCode theme that is
@xsfh1203
@xsfh1203 3 жыл бұрын
Can you remap the "caps lock" key to escape instead of using "k", "j"? if so whats the string of the key?
@Byynx
@Byynx 4 ай бұрын
Do you know how to change the text caret to steady block?
@SuboptimalEng
@SuboptimalEng 4 ай бұрын
It’s a setting in VS Code.
@leoblack8497
@leoblack8497 2 жыл бұрын
how is this extension any different from neovim extension , apart from not being an emulation ?
@DesertEagleNV
@DesertEagleNV 3 жыл бұрын
I set my keybindings in VS Code to that of WebStorm (migrated from WS), plus installed a few extensions that boost coding and code navigation. Is Vim much better than all the most popular code-snippet extensions in the Marketplace?
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Never tried the WebStorm keybindings so idk. Would def recommend giving Vim keybindings a shot tho!
@DesertEagleNV
@DesertEagleNV 3 жыл бұрын
@@SuboptimalEng Thanks for your quick reply. Watching a few videos about Vim navigation right now to see if it can beat my current setup.
@suryanshdey4773
@suryanshdey4773 21 күн бұрын
bro Alt + arrow key can be used to move code blocks in also most no stroke and talking about home row, you have to press Esc again and again to switch modes while in in VS code it's just a hold on Ctrl or Alt, more accessable, and done! Multi cursor with more UI like showing parent code when in a nested code block makes navigation far easier! Obviously VS code don't have any restriction so it can always have vim like feature + more. Never less. Also you can impress girls too by using tonnes of keyboard shortcuts which normal people don't use since their is UI . While most the girls don't never heard of vim, since they have a life, hence vim flex can only work on male nerds only not hot girls!
@cccccc864
@cccccc864 2 жыл бұрын
Do you have a way to use Cmd-D with vim installed? Also, how did you make it so when keep pressing j or k it repeats? If I do that in my Mac it will move just once.
@shynsky
@shynsky 2 жыл бұрын
for key repeats, write this in terminal: defaults write com.microsoft.VSCode ApplePressAndHoldEnabled -bool false
@Lyrik-Klinge
@Lyrik-Klinge 2 жыл бұрын
Great and THANKS!
@MariusSemeonOrtiz
@MariusSemeonOrtiz 2 жыл бұрын
Anyone else unable to see colon commands as a status bar at the bottom using the vim extension in vscode?
@Hengul
@Hengul 2 жыл бұрын
Loved it
@ignaciofernandezquesada2782
@ignaciofernandezquesada2782 2 жыл бұрын
Thanks dude!!
@giuseppepereira6194
@giuseppepereira6194 2 жыл бұрын
Dev A: Heyy, why are you moving your hand away from homerow!? Dev B: I need the mouse for search in StackOverflow, copy-paste and on the other hand, I just need alt+tab Dev A: Ohh
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Dev A: So have ya heard about Vimium?
@MrTaken-tl4bw
@MrTaken-tl4bw 6 күн бұрын
cool video...but how can i exit a document without saving?
@SuboptimalEng
@SuboptimalEng 2 күн бұрын
you can’t, it’s just not possible
@s1dev
@s1dev 3 жыл бұрын
How do I navigate around my files? creating files and folders?
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
You should be able to traverse the project directory using vim commands `jkhl` As for making files/folders - I still do it manually
@s1dev
@s1dev 3 жыл бұрын
@@SuboptimalEng How do you close the explorer? (it can be opened by pressing ctrl + shift + e) can you open the file as a split screen (when opening with jl)? EDIT: closing the explorer was ctrl + b
@shaileshsundram
@shaileshsundram 3 жыл бұрын
@@SuboptimalEng @S1DEV You can use advanced-new-file extension for VS Code to create files as well as folders just using your keyboard.
@RobertAlexanderRM
@RobertAlexanderRM 9 ай бұрын
Thank you very much. Would be great if you could provide somewhere to copy those text settings and copy them in out files.
@SuboptimalEng
@SuboptimalEng 9 ай бұрын
Good to hear the video was helpful. I have these settings on my GitHub dotfiles repository.
@RobertAlexanderRM
@RobertAlexanderRM 9 ай бұрын
@@SuboptimalEng That is great! Thanks a lot. I am a vi veteran and sometimes pop out of VSCode just to be eiting more "naturally" and also sometimes pepper my vanilla VSCode with :x and related stuff :) Thanks a lot
@GigaMarou
@GigaMarou Жыл бұрын
why would you insert tabs in read only?
@SuboptimalEng
@SuboptimalEng Жыл бұрын
I think I'm just used to it at this point.
@marshzhou7794
@marshzhou7794 2 жыл бұрын
what theme are you using?
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Gruvbox dark
@koishikisskogasa
@koishikisskogasa 2 жыл бұрын
WHAT IS THE BUTTON TO OPEN THAT TOP SCREEN AND TYPE THE VIM
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
What top screen?
@mertgenc9890
@mertgenc9890 2 жыл бұрын
there is a problem with vscode. while i coding react or jsx syntax, sometimes vim crashing. is there anyone encountering this issue?
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Never had this problem before, can’t help you there unfortunately
@AliSiHosseini
@AliSiHosseini 7 ай бұрын
do you think vim is much more efficient more than vscode?
@SuboptimalEng
@SuboptimalEng 7 ай бұрын
I think it just depends on personal preference. Using Vim in VSCode works best for me. I’m certainly not more efficient using just Vim.
@wlqpqpqlqmwnhssisjw6055
@wlqpqpqlqmwnhssisjw6055 Жыл бұрын
cool video
@Eddie-um6cw
@Eddie-um6cw 3 жыл бұрын
ummm bro can you have me, when i go to preferences setting (JSON) im not see vim or any key binding like that, how can i change key ?? :
@Eddie-um6cw
@Eddie-um6cw 3 жыл бұрын
It's like there is no vim setting, just theme setting and other setting not vim setting help me pls ;-;
@gubby740
@gubby740 3 жыл бұрын
at 5:08, how did you open that top search bar
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
mac: cmd + shift + p windows: ctrl + shift + p (i think)
@evilcorp.7288
@evilcorp.7288 3 жыл бұрын
where i can open this setting.json for vim keybinding changes............... i tried but cannot find it plz help
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Run "cmd + shift + p" and start typing "settings". You should be able to select "Preferences: Open Settings (JSON)". Note: I think it's "ctrl + shift + p" on windows.
@Ikram-Hussain
@Ikram-Hussain 2 жыл бұрын
how are you displaying you keystrockes?
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
You can display keyboard clicks in VS Code by enabling it in your settings.json file.
@Ikram-Hussain
@Ikram-Hussain 2 жыл бұрын
@@SuboptimalEng btw I forgot to ask which theme u used in here 0:04
@phantombeing3015
@phantombeing3015 2 жыл бұрын
What is cmd in cmd + key in "key" in keybindings?
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
It’s the Mac command key.
@phantombeing3015
@phantombeing3015 2 жыл бұрын
@@SuboptimalEng what should I do it in Linux laptop? can I do super key here? And what suggestion extension do you recommend? i am trying to use tabnine. And, I want to add shortcut to close the suggestion pop up if I don't find good one. Esc works but it is too far. I want to map it to some key. What is the name to do that in keybindngs?
@joshbasnet3014
@joshbasnet3014 2 жыл бұрын
thank you for the video but i would never name my child Suboptimal Engineer .
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Maybe Optimal Engineer then?
@janetech6058
@janetech6058 3 жыл бұрын
What theme are you using? and how to set them up?
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
The theme is Gruvbox! I made a video going over how to set it up called "Watch this before you install VS Code".
@srijonp4
@srijonp4 10 ай бұрын
But bro where do I learn it from ?
@diggee172
@diggee172 Жыл бұрын
Thanks!
@SuboptimalEng
@SuboptimalEng Жыл бұрын
Glad you found the video helpful!
@EDS432
@EDS432 2 жыл бұрын
why command + shift + x when you just move your mouse 1cm to the left....
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Because using the mouse is suboptimal
@EDS432
@EDS432 2 жыл бұрын
@@SuboptimalEng no its not. Its like: Hey, instead of moving your mouse 1cm, just Press CTRL + V + X + F2 + Tab + K + L Why? because moving mouse is suboptimal, then you are not a good programmer
@AllexChyu
@AllexChyu 2 жыл бұрын
can you use fzf and ripgrep ?
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
VS Code has those two features built-in, though they are named differently. Go to file, and find all (I believe).
@MiroredImage
@MiroredImage 3 жыл бұрын
I've set up VSCode like this but the only (pretty big) issue I've run into is with code folds. Whenever I fold my code in VSCode Vim, it becomes extremely difficult to scroll the screen past that fold. Ctrl+E, Ctrl+D, Ctrl+F, they all become powerless against a single code fold lol. It might seem small but it makes the whole experience so constantly awkward that I have to either not fold any of my code and jump across a bunch of lines all the time, or just not use VSCode Vim at all.
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
that's unfortunate 🥲
@ibgib
@ibgib 2 жыл бұрын
I also have this issue a bit, and I use code folding a lot. However I love using vscodevim and use three code fold keyboard commands extensively: 1) cmd + k, cmd + j - unfold all. 2) cmd + k, cmd + 2/3/4 - folds to level N. (most scoping inside for me is inside 2/3/4 levels.) 3) cmd + k, cmd + [ - fold at the current position. (All three chords are done without letting up on the cmd key with the left hand, so they are extremely quick.) So I fold to N scope usually when trying to scan through code. If I need to navigate down, I use [N]j/k, with quote-quote to go back if necessary. An _extremely_ quick jump down is 33,j or 44,j, with an optional z,z, which acts like ctrl+F without the need for the emac-like chording. Also, if you don't have it, I recommend setting relative line numbers to make navigation easier. But tastes differ!
@MiroredImage
@MiroredImage 2 жыл бұрын
@@ibgib I think you are onto something. I haven't though about this sort of quick-folding and unfolding since writing that comment months ago. These days when using VSCodeVim I just don't fold my code, but I think this technique of quickly folding for an overview and navigating with just cursor movements could be very helpful. I also like the idea of shift + l/h to quickly get the cursor to the bottom/top of the screen to start scrolling with the cursor. Thank you very much for the advice!
@ibgib
@ibgib 2 жыл бұрын
@@MiroredImage Shift High & Low! Some of my least-remembered commands. Interesting that Shift + L seems to scroll despite code folding which I'm sure will come in handy from now on. (H doesn't seem to do the trick.)
@ibgib
@ibgib 2 жыл бұрын
@@MiroredImage Oh I just had to respond one more thing...I had forgotten that I solved my scrolling with cmd + up/down arrow keys. Not HOME hardcore-vim blasphemy I'm sure, but I like to have different physical posture "modes" (helps like crop rotation, only it's muscle groups). To reproduce this default scrolling behavior, I include the following binding (also of course its down dual): ``` { "key": "cmd+up", "command": "editorScroll", "when": "textInputFocus", "args": { "to": "up", "value": 4, "revealCursor": true, "by": "line" } }, ``` (Maybe one day, YT will format code blocks! I wonder if it's today...)
@alastairtheduke
@alastairtheduke 8 ай бұрын
Hmmm not sure why but shift+tab does't work for me
@SuboptimalEng
@SuboptimalEng 8 ай бұрын
I’m not sure why it doesn’t work for you. Maybe you have another key binding set up for it. Hard to say without knowing your VS Code setup.
@Srednicki123
@Srednicki123 2 жыл бұрын
Where do I find the settings file???
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
You can find them on my GitHub under the Dotfiles repository 👍🏾
@lifeless9768
@lifeless9768 3 жыл бұрын
This plugin does make vscode noticeably slower
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Oh interesting, I never noticed any performance issues with the Vim plugin. I'm no expert, but I've heard (unconfirmed rumors) that the Neovim plugin is a little faster so maybe that would help your case.
@nodidog
@nodidog 3 жыл бұрын
You'll probably end up going full vim once you've dipped your toes in the water though, and then everything will be light speed
@lifeless9768
@lifeless9768 3 жыл бұрын
@@nodidog I do like vscode because of the integration with cmake. So it will be hard to switch.
@nodidog
@nodidog 3 жыл бұрын
@@lifeless9768 That makes sense, whatever works for you 👍 There is a good selection of cmake integration plugins out there that you may find useful though, cmake4vim, language servers for code completion etc.
@chandradithyak.g460
@chandradithyak.g460 3 жыл бұрын
what theme are u using?
@SuboptimalEng
@SuboptimalEng 3 жыл бұрын
Gruvbox
@alinemansur3824
@alinemansur3824 2 жыл бұрын
Hi! I was delighted with your video and would like to know what color scheme was used in this example. Amazing.
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Thanks Aline! I was using Gruvbox theme in the video.
@amritborah2773
@amritborah2773 3 жыл бұрын
lucky me i learnt shift+v to select line exists from this video otherwise i use to just use visual mode
@beingwarrior
@beingwarrior Жыл бұрын
thanks
@vor946
@vor946 2 жыл бұрын
i dont see why tab not working in visual mode is an issue? but very nice video
@SuboptimalEng
@SuboptimalEng 2 жыл бұрын
Thanks! I got used to pressing tabs and I assumed most people were as well
Как быстро освоить Vim / Neovim?
23:31
PurpleSchool | Anton Larichev
Рет қаралды 54 М.
Vim As Your Editor - Introduction
12:24
ThePrimeagen
Рет қаралды 870 М.
ROLLING DOWN
00:20
Natan por Aí
Рет қаралды 10 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 3 МЛН
Prank vs Prank #shorts
00:28
Mr DegrEE
Рет қаралды 3,8 МЛН
Mastering VIM Motions in VSCode (Mouseless development)
7:41
Don't Use the Sidebar in VS Code!!
9:15
James Q Quick
Рет қаралды 395 М.
Beginner Vim Walkthrough
16:28
Ben Awad
Рет қаралды 45 М.
I tried 10 code editors
10:28
Fireship
Рет қаралды 3 МЛН
Ditch VSCode Spyware For VSCodium
9:50
Mental Outlaw
Рет қаралды 236 М.
What is WebGPU?
14:09
Suboptimal Engineer
Рет қаралды 61 М.
You Should Use A Neovim Distro If You Are New
10:42
ThePrimeTime
Рет қаралды 155 М.
Why I Cant Stand IDE's After Using VIM | Prime Reacts
17:51
ThePrimeTime
Рет қаралды 293 М.
Learning Vim in a Week
23:51
thoughtbot
Рет қаралды 463 М.
Zed “kills” VSCode
12:10
Alex Ziskind
Рет қаралды 715 М.
ROLLING DOWN
00:20
Natan por Aí
Рет қаралды 10 МЛН