
:iabbrev bvediimport P from key component of this is bved. You ready? Let's start with the import part. M圜omponent going to happen is, I'm going to put M圜omponent in a register and just paste it anywhere I need to. This is how is going to be: I put a word (the name of my component) and then the abbreviation. Anyway, we don't need no stinking multiple cursors, we literally just need to put the same word in multiple places. I know there is a plugin, but I want it to be a native feature. I'll be honest, I'm jealous, I want multiple cursor in vim. The cool thing about it is that it uses the multiple cursor feature of vscode to let you replace Name with the name of your component. One of those snippets is called vimport-export, it creates this boilerplate. Let's do it.ĭo you know about vue-vscode-snippets? No. After I type everything, I hit the, press ? (backward search), look for a z, hit enter to submit the search (the part) and that will take me where I want, finally the xi part deletes the z and lets me go back to insert mode. Since I only want to focus on insert mode I'll be using :iabbrev. Step 0Ībbreviations can be assigned with the command :ab. But don't worry, we'll take one step at a time. We will go from the most basic use case to some that are more elaborated. This time we'll explore a feature called "abbreviation" and how can we use it to automate things in insert mode (you can use it in other modes but I'll focus on insert mode). Then you move over to the left and type "this." then to the right and type "= object.", then paste and put a semicolon.One of the things vim does extremely well is automation. You select every colon in the literal, highlight and copy each property name, then paste them inside the constructor function. Inside the constructor, you want to assign each property from the object literal to "this". You want to pass it into a constructor function. You have a javascript object literal with 8 properties on it. You select all the li's, move inside the tags and start typing. You've got an unordered list and you want to add a paragraph tag inside of every li. You then edit each one and put the name of the class in front, put a colon after each one, then hit enter. You copy all of the possible names on the enum using multiselect and paste them into your switch. You want to write a switch statement to catch every possible value and throw an error if the value is incorrect. You have a class with an integer enum on it with let's say 15 values. And please those of you who deign to grace us with your vim wisdom - be kind. Vim Awesome: list of popular vim plugins.ĭon't be afraid to ask questions, this sub is here for the vim community.
#VIM MULTIPLE CURSORS HOW TO#
Learn Vimscript the Hard Way: is a book for users of the Vim editor who want to learn how to customize Vim.Derek Wyatt's Vim tutorial videos: video tutorials by Derek Wyatt's.Vimcasts: screencasts by the author of practical vim.7 habits of effective text editing: a short guide on getting better at editing by the Vim author.usevim: a vim blog with some great outbound links.Patrick Schanen's Vim Page: an index of vim resources more complete than this list.vi.: questions and answers stackexchange style.: the most popular vim wiki, lots of great content.
#VIM MULTIPLE CURSORS MAC#
#VIM MULTIPLE CURSORS MANUAL#
