InfoHeap
Tech
Navigation
  • Home
  • Tutorials
    • CSS tutorials & examples
    • CSS properties
    • Javascript cookbook
    • Linux/Unix Command Line
    • Mac
    • PHP
      • PHP functions online
      • PHP regex
    • WordPress
  • Online Tools
    • Text utilities
    • Online Lint Tools
search

Vim tutorials

  • Character toggle case
  • Go back to last edited line
  • Move to matching bracket
  • Multiline search replace with confirmation
  • Open vim at previous location
  • Vim mini cheat sheet
  • Vim redo (undo of last undo)
  • show line numbers
 
  • Home
  • > Tutorials
  • > Vim

Vim – show line numbers

on Mar 21, 2016

Vim can show and hide line numbers in editor. Here are Vim commands for it.

Show line numbers in vim

After [ESC] enter the following

:set nu
// or 
:set number

Hide line numbers in vim

After [ESC] enter the following

:set nonu
// or 
:set nonumber

Toggle line numbers in vim

After [ESC] enter the following

:set nu!
// or 
:set number!

Suggested posts:

  1. AngularJS format date using date filter
  2. AngularJS ng-href example
  3. CORS – cross origin request tutorial and example in PHP
  4. php get array value with default
  5. AngularJS ng-focus example
  6. HTML input checkbox
  7. wget handy commands
  8. CSS overflow – visible, hidden and scroll for overflowing content
Share this article: share on facebook share on linkedin tweet this submit to reddit
Posted in Tutorials | Tagged Tutorials, Vim
  • Browse content
  • Article Topics
  • Article archives
  • Contact Us
Popular Topics: Android Development | AngularJS | Apache | AWS and EC2 | Bash shell scripting | Chrome developer tools | Company results | CSS | CSS cookbook | CSS properties | CSS Pseudo Classes | CSS selectors | CSS3 | CSS3 flexbox | Devops | Git | HTML | HTML5 | Java | Javascript | Javascript cookbook | Javascript DOM | jQuery | Kubernetes | Linux | Linux/Unix Command Line | Mac | Mac Command Line | Mysql | Networking | Node.js | Online Tools | PHP | PHP cookbook | PHP Regex | Python | Python array | Python cookbook | SEO | Site Performance | SSH | Ubuntu Linux | Web Development | Webmaster | Wordpress | Wordpress customization | Wordpress How To | Wordpress Mysql Queries | InfoHeap Money

Copyright © 2025 InfoHeap.

Powered by WordPress