Posted on: December 15, 2020 07:34 PM
Posted by: Renato
Views: 169
Para adicionar número de linhas no Vi ou Vim simplesmente abra o editor e digite o comando :set nu enquanto estiver no modo de comandos. Caso queira desativar, digite :set nonu e deixará de ver o número das linhas.
Número de linhas no vim
Caso queira também mostrar cor na sintaxe (conforme a imagem acima), digite o comando :syntax on . É um comando que recebe apenas “on” ou “off” para ligado e desligado respectivamente.
Provavelmente você vai querer que essas opções fiquem ativas assim que você entrar no vi ou vim, nesse caso crie ou edite o arquivo ~/.vimrc digitando:
vi ~/.vimrc
Adicione o seguinte neste arquivo:
set number syntax on
Salve o arquivo, feche o vi ou vim e pronto!
Em adição a este tutorial, veja como está o meu arquivo ~/.vimrc pessoal:
# Número de linhas set number # Cor de sintaxe syntax on # Correção de tabs set tabstop=4 set shiftwidth=4 set expandtab set softtabstop=4 set smarttab
Faça um teste.
Fonte: https://www.todoespacoonline.com/w/2015/08/mostrar-numero-de-linhas-no-vi-vim/
Renato Lucena - 15/12/2020
Renato
Developer
-
Parbriz KIA PREGIO Box TB 2018 - 1 month ago
Hello! This is kind of off topic but I need some advice from an established blog. Is it tough to set up your own blog? I'm not very techincal but I can figure things out pretty quick. I'm thinking about making my own but I'm not sure where to start. Do you have any points or suggestions? Many thanks https://vanzari-parbrize.ro/parbrize/parbrize-kia.html -
Geam Subaru Justy 3 - 1 month ago
Good blog you have got here.. It's hard to find good quality writing like yours nowadays. I honestly appreciate individuals like you! Take care!! https://anunturi-parbrize.ro/index.php?page=56036 -
Parbriz Hyundai I30 Coupe - 1 month ago
It's an remarkable piece of writing designed for all the internet viewers; they will take advantage from it I am sure. https://parbrize24ore.ro/oferta-parbrize.php?an=2011&produs=parbriz&marca=FIAT&model=500+%28312_%29+&foto=parbriz-fiat.png -
Parbriz auto JEEP CHEROKEE KK 2011 - 1 month ago
Spot on with this write-up, I absolutely feel this amazing site needs far more attention. I'll probably be returning to read more, thanks for the information! https://vanzari-parbrize.ro/parbrize/parbrize-jeep.html -
Parbriz Honda Civic Hatchback - 1 month ago
You actually make it appear really easy together with your presentation but I in finding this matter to be actually something that I feel I might by no means understand. It seems too complicated and very large for me. I'm looking forward to your next post, I'll attempt to get the cling of it! https://anunturi-parbrize.ro/index.php?page=21624