Wednesday, May 15, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 1428  / 2 Years ago, tue, april 26, 2022, 11:43:20

I am attempting to open a c file using Vim in Ubuntu from the bash command line, but it's not opening.



I want to open the following file:



~/Documents/ex8.c


using the following command:



~/Documents$ vim ex8.c


I definitely installed Vim; however when I run the command it just displays the prompt again and doesn't give a hoot. BTW, I also tried Google, but I found nothing useful.



Being new to Linux, I might be doing something wrong; I appreciate any help in this matter.


More From » bash

 Answers
7

You might have something wrong in your ~/.vimrc, causing vim to quit when it starts. Try moving it to see if that helps.


mv ~/.vimrc ~/.vimrc.bak

You can also skip all initializations by using -u NONE


vim -u NONE ~/Documents/ex8.c

Documentation:



   -u {vimrc}  Use  the  commands in the file {vimrc} for initializations.  All the other initializations are skipped.  Use this to edit a special kind of files.
It can also be used to skip all initializations by giving the name "NONE". See ":help initialization" within vim for more details.


[#14077] Thursday, April 28, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
neasinient

Total Points: 491
Total Questions: 120
Total Answers: 93

Location: The Bahamas
Member since Mon, Aug 2, 2021
3 Years ago
;