How to open files through vim editor in cscope?

The name of the pictureThe name of the pictureThe name of the pictureClash 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.







share|improve this question

























    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.







    share|improve this question





















      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.







      share|improve this question











      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.









      share|improve this question










      share|improve this question




      share|improve this question









      asked Jul 19 at 7:11









      kaushik chatterjee

      31




      31




















          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".






          share|improve this answer





















          • 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






          • 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










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          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






























          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".






          share|improve this answer





















          • 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






          • 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














          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".






          share|improve this answer





















          • 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






          • 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












          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".






          share|improve this answer













          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".







          share|improve this answer













          share|improve this answer



          share|improve this answer











          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 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




            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










          • @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




            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












           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          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













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay