Learn Vim

@learnvim

Daily vim tips. Follow to learn something about vim. Author

Vrijeme pridruživanja: studeni 2019.

Tweetovi

Blokirali ste korisnika/cu @learnvim

Jeste li sigurni da želite vidjeti te tweetove? Time nećete deblokirati korisnika/cu @learnvim

  1. prije 14 sati

    If you want to get word count on your file, you can just do g + Ctrl-g (Also gives Column, line, and byte info)

    Poništi
  2. 31. sij

    To replace a string/pattern inside a specific file extension, you can do: :argdo **/*.yourExtension qq :%s/oldPattern/newPattern/ge :wnext q 999@q This will replace every single occurrence of 'oldPattern' with 'newPattern' inside all files that ends with '.yourExtension' 👍

    Poništi
  3. 31. sij

    You can create shortcut to quickly get directory of the file you're working on: nnoremap <Leader>bp :let @+=expand("%:p")<CR> This will copy the path to clipboard.

    Poništi
  4. 30. sij

    Vim fugitive (() is one of the best plugins. Ever. Here is one great resource to learn it!

    Poništi
  5. 25. sij

    Whenever I have a quick config change, I just fire <Leader>ve -> make edit -> save -> <Leader>vs -> back to whatever I was doing before :)

    Prikaži ovu nit
    Poništi
  6. 25. sij

    Cool trick I learned a while ago to quickly edit vimrc on fly: if !has('nvim') nnoremap <Leader>vs :source $MYVIMRC<CR> nnoremap <Leader>ve :vsplit $MYVIMRC<CR> elseif has('nvim') nnoremap <Leader>vs :source ~/.vimrc<CR> nnoremap <Leader>ve :vsplit ~/.vimrc<CR> endif

    Prikaži ovu nit
    Poništi
  7. 21. sij

    Vim users, do you use tmux? Here is a really good book on Tmux (not affiliated, just a happy fan): It changed a lot of my workflow.

    Poništi
  8. 20. sij
    Poništi
  9. 20. sij

    If you edit markdown often, you might find useful. It allows you to view livedown on local server. - Install plugin + livedown npm - :LivedownToggle - done! 🎉🎊 livedown:

    Poništi
  10. 18. sij

    Did you know that - after searching with backslash ( / ), you can repeat the last search with double backslash ( // )?

    Poništi
  11. 17. sij

    When searching with / you can use regex too! For example, if you're looking for all digits followed with dot (ex: 1., 2., 3., etc) 1. some text 2. more text 3. even more text You can do /\d\. Or if you have more than single digits, do /\v(\d)+\.

    Poništi
  12. 16. sij

    Do you use text objects in vim? Chances are you're probably on one already. ex: diw - delete word object viw - visual mode word object yiW - yank WORD object di{ - delete {} object di( - delete () object And so on!

    Poništi
  13. proslijedio/la je Tweet
    13. sij

    We'll focus on z today. I see z used most often with code folding and spell checking. Let's look at folds: zo, zO, zc, zC, za, zA open, close, and toggle the fold under cursor, with the capital letter meaning all folds under cursor recursively See :h fold

    Poništi
  14. 14. sij

    Good vim overview videos - has some neat tips!

    Poništi
  15. 11. sij

    Use Vim's spellchecking ability to detect typos! :set spell spelllang=en_us It will highlight all misspellings. You can also jump to next misspelled words with either ]s or [s 🤓

    Poništi
  16. 10. sij

    Using Vim for creative writing? 📖✍️😌 Check out Goyo (). I used this when I am not writing code.

    Poništi
  17. 9. sij

    Picking up from yesterday: Notice Bill Joy's ESC key is on the left side of keyboard, not top left like modern keyboard. This is why it feels unnatural for our finger to reach ESC key. Personally I map my ESC to Caps Lock, to emulate original Vi's experience ⌨️

    Poništi
  18. 8. sij
    Poništi
  19. 8. sij

    Do you ever wonder why vim uses `hjkl` to move around? Bill Joy, vi creator, uses ADM-3A terminal. It has keyboard with arrows on it. Naturally `hjkl` is used as left/down/up/right. Source:

    Poništi
  20. 7. sij

    A very important text-editor feature is searching 🧐. I have been using FZF for a while and it has been awesome. You can pair FZF with code-searching tools like the_silver_searcher or ripgrep!

    Poništi

Čini se da učitavanje traje već neko vrijeme.

Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.

    Možda bi vam se svidjelo i ovo:

    ·