How to open files through vim editor in cscope?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
0
down vote
favorite
I want to open a .c file , that I found using cscope, in vim editor. Normally it opens in vi editor. I have made and edited vimrc file using a configuration that I found online but it isn't working. Can anyone recommend a a proper configuration for vimrc?
Is there any other way to do it?
Also I am working on my office system, so I am not the super user.
linux vim
add a comment |Â
up vote
0
down vote
favorite
I want to open a .c file , that I found using cscope, in vim editor. Normally it opens in vi editor. I have made and edited vimrc file using a configuration that I found online but it isn't working. Can anyone recommend a a proper configuration for vimrc?
Is there any other way to do it?
Also I am working on my office system, so I am not the super user.
linux vim
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I want to open a .c file , that I found using cscope, in vim editor. Normally it opens in vi editor. I have made and edited vimrc file using a configuration that I found online but it isn't working. Can anyone recommend a a proper configuration for vimrc?
Is there any other way to do it?
Also I am working on my office system, so I am not the super user.
linux vim
I want to open a .c file , that I found using cscope, in vim editor. Normally it opens in vi editor. I have made and edited vimrc file using a configuration that I found online but it isn't working. Can anyone recommend a a proper configuration for vimrc?
Is there any other way to do it?
Also I am working on my office system, so I am not the super user.
linux vim
asked Jul 19 at 7:11
kaushik chatterjee
31
31
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
cscope
uses the environment variable EDITOR
for editing files. If this environment variable is unset, it uses vi
.
To set EDITOR
to vim
, put the following in you shell initialisation file for interactive shells ($HOME/.bashrc
for bash
users):
export EDITOR=vim
You may alternatively use CSCOPE_EDITOR
instead of EDITOR
(if you don't want to set EDITOR
, which may be used by any number of other programs, including the shell, for example). The CSCOPE_EDITOR
environment variable overrides the EDITOR
setting.
This is mentioned in the cscope
manual in the section "ENVIRONMENT VARIABLES".
Hi, I deed as you told but the issue still persists. I tried both CSCPOE_EDITOR and EDITOR .
â kaushik chatterjee
Jul 19 at 8:27
@kaushikchatterjee Note the spelling ofCSCOPE_EDITOR
. These has to be set in the current shell session. Just adding them to~/.bashrc
will not do anything until you start a new shell.
â Kusalananda
Jul 19 at 8:29
1
Yes its working now. My spelling was right. Once a I edited the~/.bashrc
file in bash , I opened a new terminal and from there I was running cscope . That was the mistake. Now, I continued within the same bash and its working now. Thanks.
â kaushik chatterjee
Jul 19 at 8:39
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
cscope
uses the environment variable EDITOR
for editing files. If this environment variable is unset, it uses vi
.
To set EDITOR
to vim
, put the following in you shell initialisation file for interactive shells ($HOME/.bashrc
for bash
users):
export EDITOR=vim
You may alternatively use CSCOPE_EDITOR
instead of EDITOR
(if you don't want to set EDITOR
, which may be used by any number of other programs, including the shell, for example). The CSCOPE_EDITOR
environment variable overrides the EDITOR
setting.
This is mentioned in the cscope
manual in the section "ENVIRONMENT VARIABLES".
Hi, I deed as you told but the issue still persists. I tried both CSCPOE_EDITOR and EDITOR .
â kaushik chatterjee
Jul 19 at 8:27
@kaushikchatterjee Note the spelling ofCSCOPE_EDITOR
. These has to be set in the current shell session. Just adding them to~/.bashrc
will not do anything until you start a new shell.
â Kusalananda
Jul 19 at 8:29
1
Yes its working now. My spelling was right. Once a I edited the~/.bashrc
file in bash , I opened a new terminal and from there I was running cscope . That was the mistake. Now, I continued within the same bash and its working now. Thanks.
â kaushik chatterjee
Jul 19 at 8:39
add a comment |Â
up vote
0
down vote
accepted
cscope
uses the environment variable EDITOR
for editing files. If this environment variable is unset, it uses vi
.
To set EDITOR
to vim
, put the following in you shell initialisation file for interactive shells ($HOME/.bashrc
for bash
users):
export EDITOR=vim
You may alternatively use CSCOPE_EDITOR
instead of EDITOR
(if you don't want to set EDITOR
, which may be used by any number of other programs, including the shell, for example). The CSCOPE_EDITOR
environment variable overrides the EDITOR
setting.
This is mentioned in the cscope
manual in the section "ENVIRONMENT VARIABLES".
Hi, I deed as you told but the issue still persists. I tried both CSCPOE_EDITOR and EDITOR .
â kaushik chatterjee
Jul 19 at 8:27
@kaushikchatterjee Note the spelling ofCSCOPE_EDITOR
. These has to be set in the current shell session. Just adding them to~/.bashrc
will not do anything until you start a new shell.
â Kusalananda
Jul 19 at 8:29
1
Yes its working now. My spelling was right. Once a I edited the~/.bashrc
file in bash , I opened a new terminal and from there I was running cscope . That was the mistake. Now, I continued within the same bash and its working now. Thanks.
â kaushik chatterjee
Jul 19 at 8:39
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
cscope
uses the environment variable EDITOR
for editing files. If this environment variable is unset, it uses vi
.
To set EDITOR
to vim
, put the following in you shell initialisation file for interactive shells ($HOME/.bashrc
for bash
users):
export EDITOR=vim
You may alternatively use CSCOPE_EDITOR
instead of EDITOR
(if you don't want to set EDITOR
, which may be used by any number of other programs, including the shell, for example). The CSCOPE_EDITOR
environment variable overrides the EDITOR
setting.
This is mentioned in the cscope
manual in the section "ENVIRONMENT VARIABLES".
cscope
uses the environment variable EDITOR
for editing files. If this environment variable is unset, it uses vi
.
To set EDITOR
to vim
, put the following in you shell initialisation file for interactive shells ($HOME/.bashrc
for bash
users):
export EDITOR=vim
You may alternatively use CSCOPE_EDITOR
instead of EDITOR
(if you don't want to set EDITOR
, which may be used by any number of other programs, including the shell, for example). The CSCOPE_EDITOR
environment variable overrides the EDITOR
setting.
This is mentioned in the cscope
manual in the section "ENVIRONMENT VARIABLES".
answered Jul 19 at 7:15
Kusalananda
101k13199311
101k13199311
Hi, I deed as you told but the issue still persists. I tried both CSCPOE_EDITOR and EDITOR .
â kaushik chatterjee
Jul 19 at 8:27
@kaushikchatterjee Note the spelling ofCSCOPE_EDITOR
. These has to be set in the current shell session. Just adding them to~/.bashrc
will not do anything until you start a new shell.
â Kusalananda
Jul 19 at 8:29
1
Yes its working now. My spelling was right. Once a I edited the~/.bashrc
file in bash , I opened a new terminal and from there I was running cscope . That was the mistake. Now, I continued within the same bash and its working now. Thanks.
â kaushik chatterjee
Jul 19 at 8:39
add a comment |Â
Hi, I deed as you told but the issue still persists. I tried both CSCPOE_EDITOR and EDITOR .
â kaushik chatterjee
Jul 19 at 8:27
@kaushikchatterjee Note the spelling ofCSCOPE_EDITOR
. These has to be set in the current shell session. Just adding them to~/.bashrc
will not do anything until you start a new shell.
â Kusalananda
Jul 19 at 8:29
1
Yes its working now. My spelling was right. Once a I edited the~/.bashrc
file in bash , I opened a new terminal and from there I was running cscope . That was the mistake. Now, I continued within the same bash and its working now. Thanks.
â kaushik chatterjee
Jul 19 at 8:39
Hi, I deed as you told but the issue still persists. I tried both CSCPOE_EDITOR and EDITOR .
â kaushik chatterjee
Jul 19 at 8:27
Hi, I deed as you told but the issue still persists. I tried both CSCPOE_EDITOR and EDITOR .
â kaushik chatterjee
Jul 19 at 8:27
@kaushikchatterjee Note the spelling of
CSCOPE_EDITOR
. These has to be set in the current shell session. Just adding them to ~/.bashrc
will not do anything until you start a new shell.â Kusalananda
Jul 19 at 8:29
@kaushikchatterjee Note the spelling of
CSCOPE_EDITOR
. These has to be set in the current shell session. Just adding them to ~/.bashrc
will not do anything until you start a new shell.â Kusalananda
Jul 19 at 8:29
1
1
Yes its working now. My spelling was right. Once a I edited the
~/.bashrc
file in bash , I opened a new terminal and from there I was running cscope . That was the mistake. Now, I continued within the same bash and its working now. Thanks.â kaushik chatterjee
Jul 19 at 8:39
Yes its working now. My spelling was right. Once a I edited the
~/.bashrc
file in bash , I opened a new terminal and from there I was running cscope . That was the mistake. Now, I continued within the same bash and its working now. Thanks.â kaushik chatterjee
Jul 19 at 8:39
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f457144%2fhow-to-open-files-through-vim-editor-in-cscope%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password