When you use a CSS framework as flexible as Bulma, you want to have only the necessary components and no more. When you create your own "theme" you can import only the components and elements that you want to use.
Now, what happens when you're not sure which files contain which rules?
Import everything and then comment on those that are not necessary in that moment.
But... How do we import all the components and elements of Bulma, easily?
I've found these macros that can be very useful:
let @q='02t/"cyt"o^[;r ^Rc^Mdd.2kI// ^[2j0' let @j='0f"a../.^["cpF/l3dfsA;^[j0' let @k='02f"i.sass^[j0'
Now, if you copy and paste these commands, they won't work because they contain control characters (and others), you should replace the following:
||Ctrl + v, Esc|
||Ctrl + v, Ctrl + r|
||Ctrl + v, Enter|
Note: I have these mappings in normal mode:
noremap ; : and
noremap : ;.
To make this easier, you can type
:%s/\V^[/[Ctrl + v, Esc]/g and so on with the other two control characters.
When you are in the same directory as the
node_modules folder, you can use those macros and do the following:
¿How do these macros work?
let @q='02t/"cyt"o^[;r ^Rc^Mdd.2kI// ^[2j0'
- First things first, go to beginning of line with
- Next, search forward 1 character before second
- Then, paste in the
cregister the rest of the line until the quotes with
- Insert a line below and exit the insert mode with
- Add to the file the content of the
- Delete the comment line and then the
- Go up two lines with
- Comment on the line in which we are with
- Exit the insert mode, go down two lines and go back to beginning of line with
- Go to beginning of line with
- Search the first quotes with
- Agregamos un
- Exit the insert mode with
- Paste the content of the
- Search backwards the first
/and move one character forward with
- Delete until the third
- Add the semicolon at the end of the line
- Exit the insert mode, go down one line and go to the beginning of the line with
- Look for the second quotes from the beginning of the line with
- Insert the string
- Finally, exit the insert mode, go down one line and go to the beginning of the line with
Originally posted in spanish in: https://halivert.github.io/blog/2019/07/vim-macro-for-bulma/