Home New Trending Search
About Privacy Terms
#
#vimtip
Posts tagged #vimtip on Bluesky
Daily Vim Tip:  From any bracket, brace, or parenthesis, % teleports you to its matching partner. In files with the matchit plugin loaded, it also hops between if/else/end blocks and HTML tags.

Daily Vim Tip: From any bracket, brace, or parenthesis, % teleports you to its matching partner. In files with the matchit plugin loaded, it also hops between if/else/end blocks and HTML tags.

Daily Vim Tip: From any bracket, brace, or parenthesis, % teleports you to its matching partner. In files with the matchit plugin loaded, it also hops between if/else/end blocks and HTML tags.

Learn more: run `vimtutor` in your terminal, or use `:help %` inside Vim.

#vim #vimtip #ostechnix

1 0 0 0
Daily Vim tip: Use f{char} / F{char} to move the cursor at a specific character on the current line. f jumps forward to it; F hunts backward.

Daily Vim tip: Use f{char} / F{char} to move the cursor at a specific character on the current line. f jumps forward to it; F hunts backward.

Daily Vim tip: Use f{char} / F{char} to move the cursor at a specific character on the current line. f jumps forward to it; F hunts backward. After the first jump, ; repeats in the same direction and , reverses — so you can skip through multiple matches without retyping.

#vim #vimtip #coding

2 0 0 0
Daily Vim Tip: Use e / E to land on the final character of the current word rather than the start of the next.

Daily Vim Tip: Use e / E to land on the final character of the current word rather than the start of the next.

Daily Vim Tip: Use e / E to land on the final character of the current word rather than the start of the next. Handy when you want to append to a word or delete to its tail. E skips punctuation just like W does.

#vim #vimtip #coding #ostechnix

3 1 0 0
Vim tip of the day Cheat sheet: Use b or B to move backward through Words. b treats every punctuation cluster as its own stop; B leaps back across entire non-space chunks at once. Pair with w to zip through code without touching arrow keys.

Vim tip of the day Cheat sheet: Use b or B to move backward through Words. b treats every punctuation cluster as its own stop; B leaps back across entire non-space chunks at once. Pair with w to zip through code without touching arrow keys.

Vim tip of the day: b / B

Use b or B to move backward through Words. b treats every punctuation cluster as its own stop; B leaps back across entire non-space chunks at once. Pair with w to zip through code without touching arrow keys.

#vim #vimtip #coding

3 1 0 0
Vim Tip of the day: Use w or W to move forward by word

Vim Tip of the day: Use w or W to move forward by word

Daily Vim Tip: w / W

Two flavours of 'move forward by word.' Lowercase w treats punctuation as a word boundary, so it hops between tokens. Uppercase W ignores punctuation and jumps to the next gap in whitespace — useful when navigating camelCase or paths.

#vim #vimtip #coding

1 0 0 0

TIL, in #vim (or #neovim) you can indent the current line *while in insert mode* with Ctrl-T and dedent it with Ctrl-D.

I've used Vim for decades and have always switched to Normal mode and used << and >>. This is so much better!

:help ins-special-keys is full of gems. #VimTip

2 0 0 0
Preview
Vim Spell Check <!-- FeedbackWP Plugin - Results Widget --><div class="rmp-results-widget js-rmp-results-widget js-rmp-results-widget--240" data-post-id="240"><div class="rmp-results-widget__visual-rating"> <i class="js-rmp-results-icon rmp-icon rmp-icon--ratings rmp-icon--star rmp-icon--full-highlight"></i><i class="js-rmp-results-icon rmp-icon rmp-icon--ratings rmp-icon--star rmp-icon--full-highlight"></i><i class="js-rmp-results-icon rmp-icon rmp-icon--ratings rmp-icon--star rmp-icon--full-highlight"></i><i class="js-rmp-results-icon rmp-icon rmp-icon--ratings rmp-icon--star rmp-icon--full-highlight"></i><i class="js-rmp-results-icon rmp-icon rmp-icon--ratings rmp-icon--star"></i></div><div class="rmp-results-widget__avg-rating"> <span class="js-rmp-avg-rating"> 4.2 </span></div><div class="rmp-results-widget__vote-count"> (<span class="js-rmp-vote-count">810</span>)</div></div><p>I recently came across an embarrassing typo on my own website. Buried deep in a paragraph of HTML inside a Rails HAML template, there was a glaring spelling mistake. I quickly raced back to Vim and opened the template and spell checked the whole file. How? With <code>:set spell</code>, Vim spell check.</p><p>Many novice Vim users are unaware that spell checking is built in and as easy as enabling with <code>:set spell</code>. As a veteran Vim user, I was aware of spell checking and how to turn it on, but I frequently forget the full complement of commands. So for anyone that needs reminding, here are the basics for getting the most out of Vim’s spell checker:</p><ul class="wp-block-list"><li><code>:set spell</code> – Turn on spell checking</li><li><code>:set nospell</code> – Turn off spell checking</li><li><code>]s</code> – Jump to the next misspelled word</li><li><code>[s</code> – Jump to the previous misspelled word</li><li><code>z=</code> – Bring up the suggested replacements</li><li><code>zg</code> – <strong>G</strong>ood word: Add the word under the cursor to the dictionary</li><li><code>zw</code> – <strong>W</strong>oops! Undo and remove the word from the dictionary</li></ul><p>In the screencast below, I’ve demonstrated a few of these. With the file open, <code>:set spell</code> has already been enabled. I find the first misspelled word with <code>]s</code>. It’s actually correctly spelled, it’s the name of our status page and monitoring service, <a data-wpel-link="exclude" href="https://statusgator.com/">StatusGator</a>. So I add the word to the dictionary with <code>zg</code>. Then I find the next misspelling with <code>]s</code> and press <code>z=</code> to pull up the suggestion list. Finally, I press <code>2</code> to choose the replacement.</p><figure class="wp-block-image size-full"><img alt="Vim Spell Checking demo screencast" class="wp-image-1491" decoding="async" fetchpriority="high" height="545" src="https://vimtricks.com/wp-content/uploads/2022/10/spell-checking.gif" width="900"/></figure><p></p> <style> #faqsu-faq-list { background: #F0F4F8; border-radius: 5px; padding: 15px; } #faqsu-faq-list .faqsu-faq-single { background: #fff; padding: 15px 15px 20px; box-shadow: 0px 0px 10px #d1d8dd, 0px 0px 40px #ffffff; border-radius: 5px; margin-bottom: 1rem; } #faqsu-faq-list .faqsu-faq-single:last-child { margin-bottom: 0; } #faqsu-faq-list .faqsu-faq-question { border-bottom: 1px solid #F0F4F8; padding-bottom: 0.825rem; margin-bottom: 0.825rem; position: relative; padding-right: 40px; } #faqsu-faq-list .faqsu-faq-question:after { content: "?"; position: absolute; right: 0; top: 0; width: 30px; line-height: 30px; text-align: center; color: #c6d0db; background: #F0F4F8; border-radius: 40px; font-size: 20px; } </style><section id="faqsu-faq-list" itemscope="" itemtype="http://schema.org/FAQPage"><div class="faqsu-faq-single" itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Question"><h3 class="faqsu-faq-question" itemprop="name">How do I turn on Vim spell check?</h3><div itemprop="acceptedAnswer" itemscope="" itemtype="https://schema.org/Answer"><div class="faqsu-faq-answare" itemprop="text"><p>Use <code>:set spell</code> to enable spell check in Vim.</p></div></div></div><div class="faqsu-faq-single" itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Question"><h3 class="faqsu-faq-question" itemprop="name">How do I turn off Vim spell check?</h3><div itemprop="acceptedAnswer" itemscope="" itemtype="https://schema.org/Answer"><div class="faqsu-faq-answare" itemprop="text"><p>You can disable spell checking in Vim with <code>:set nospell</code>.</p></div></div></div><div class="faqsu-faq-single" itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Question"><h3 class="faqsu-faq-question" itemprop="name">How do I find misspelled words in Vim?</h3><div itemprop="acceptedAnswer" itemscope="" itemtype="https://schema.org/Answer"><div class="faqsu-faq-answare" itemprop="text"><p>With <code>:set spell</code> enabled in Vim, you can navigate to the next misspelled word using <code>]s</code> and to navigate to the previous misspelled word, use <code>[s</code>.</p></div></div></div><div class="faqsu-faq-single" itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Question"><h3 class="faqsu-faq-question" itemprop="name">How do I see spelling suggestions in Vim?</h3><div itemprop="acceptedAnswer" itemscope="" itemtype="https://schema.org/Answer"><div class="faqsu-faq-answare" itemprop="text"><p>With <code>:set spell</code> enabled in Vim, put your cursor on a misspelled word and press <code>z=</code> to see a list of suggestions for the misspelled word.</p></div></div></div><div class="faqsu-faq-single" itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Question"><h3 class="faqsu-faq-question" itemprop="name">How do I add a word to the Vim dictionary?</h3><div itemprop="acceptedAnswer" itemscope="" itemtype="https://schema.org/Answer"><div class="faqsu-faq-answare" itemprop="text"><p>To add a word to Vim spell check dictionary, first enable spell check with <code>:set spell</code> then put your cursor on a misspelled word. Press <code>zg</code> (think of it as "g" for "good") and Vim will add it to the local dictionary.</p></div></div></div><div class="faqsu-faq-single" itemprop="mainEntity" itemscope="" itemtype="https://schema.org/Question"><h3 class="faqsu-faq-question" itemprop="name">How do I remove a word from the Vim dictionary?</h3><div itemprop="acceptedAnswer" itemscope="" itemtype="https://schema.org/Answer"><div class="faqsu-faq-answare" itemprop="text"><p>You can remove a word from the Vim dictionary by putting your cursor on a misspelled word and pressing <code>zw</code>.</p></div></div></div></section> <!-- FeedbackWP Plugin --><div class="rmp-widgets-container rmp-wp-plugin rmp-main-container js-rmp-widgets-container js-rmp-widgets-container--240" data-post-id="240"> <!-- Rating widget --><div class="rmp-rating-widget js-rmp-rating-widget"><p class="rmp-heading rmp-heading--title"> How useful was this tip?</p><div class="rmp-rating-widget__icons"><ul class="rmp-rating-widget__icons-list js-rmp-rating-icons-list"><li class="rmp-rating-widget__icons-list__icon js-rmp-rating-item" data-descriptive-rating="" data-value="1"> <i class="js-rmp-rating-icon rmp-icon rmp-icon--ratings rmp-icon--star rmp-icon--full-highlight"></i></li><li class="rmp-rating-widget__icons-list__icon js-rmp-rating-item" data-descriptive-rating="" data-value="2"> <i class="js-rmp-rating-icon rmp-icon rmp-icon--ratings rmp-icon--star rmp-icon--full-highlight"></i></li><li class="rmp-rating-widget__icons-list__icon js-rmp-rating-item" data-descriptive-rating="" data-value="3"> <i class="js-rmp-rating-icon rmp-icon rmp-icon--ratings rmp-icon--star rmp-icon--full-highlight"></i></li><li class="rmp-rating-widget__icons-list__icon js-rmp-rating-item" data-descriptive-rating="" data-value="4"> <i class="js-rmp-rating-icon rmp-icon rmp-icon--ratings rmp-icon--star rmp-icon--full-highlight"></i></li><li class="rmp-rating-widget__icons-list__icon js-rmp-rating-item" data-descriptive-rating="" data-value="5"> <i class="js-rmp-rating-icon rmp-icon rmp-icon--ratings rmp-icon--star"></i></li></ul></div><p class="rmp-rating-widget__hover-text js-rmp-hover-text"></p> <button class="rmp-rating-widget__submit-btn rmp-btn js-submit-rating-btn"> Submit Rating </button><p class="rmp-rating-widget__results js-rmp-results"> Average rating <span class="rmp-rating-widget__results__rating js-rmp-avg-rating">4.2</span> / 5. Vote count: <span class="rmp-rating-widget__results__votes js-rmp-vote-count">810</span></p><p class="rmp-rating-widget__not-rated js-rmp-not-rated rmp-rating-widget__not-rated--hidden"> No votes so far! Be the first to rate this tip.</p><p class="rmp-rating-widget__msg js-rmp-msg"></p></div> <!--Structured data --> <script type="application/ld+json">{ "@context": "http://schema.org", "@type": "Episode", "aggregateRating": { "@type": "AggregateRating", "bestRating": "5", "ratingCount": "810", "ratingValue": "4.2" }, "image": "https://vimtricks.com/wp-content/uploads/2020/11/logo-black.png", "name": "Vim Spell Check", "description": "Vim Spell Check"}</script> <!-- Feedback widget --><div class="rmp-feedback-widget js-rmp-feedback-widget"><p class="rmp-heading rmp-heading--title"> We are sorry that this post was not useful for you!</p><p class="rmp-heading rmp-heading--subtitle"> Let us improve this post!</p><div class="rmp-feedback-widget__container"><p class="rmp-feedback-widget__text"> Tell us how we can improve this post?</p><textarea class="rmp-feedback-widget__input js-rmp-feedback-input" id="feedback-text" rows="5"></textarea><button class="rmp-feedback-widget__btn rmp-btn rmp-btn--large js-rmp-feedback-button" type="button"> Submit Feedback </button><div class="rmp-feedback-widget__loader js-rmp-feedback-loader"><div></div><div></div><div></div></div><p class="rmp-feedback-widget__msg js-rmp-feedback-msg"></p></div></div></div> <!-- clearfix --><div class="clearfix"></div>

Little shout out to past me for throwing this config in my .vimrc ages ago:

" Toggle spellcheck functionality
:map <F5> :setlocal spell! spelllang=en_us<CR>

Now I get to rebuild some lost muscle memory for fixing my speeling mesteaks

https://vimtricks.com/p/vim-spell-check/

#Vim #VimTip

1 0 0 0