Disabling mouse in Vim disables indentation

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
2
down vote

favorite












I have Vim version 8.0.122 on FreeBSD 9.3 (installed with pkg). I have default global vimrc. I want to disable mouse support completely on my account, so I put



 set mouse=


in my local .vimrc. It works, mouse is disabled, but also autoindent is gone, i.e. I press enter in a .php or .c file and I'm back at the begining of the line instead of current indent position.



I want to have both, mouse disabled, autoindent working as it used to. What should I do?










share|improve this question

















  • 1




    Please add to the post how you disabled it.
    – Rui F Ribeiro
    Dec 12 '16 at 13:08










  • They are not linked in any way. To debug, make a simple .vimrc file containing just set nocompatible, set all&, set ai bs=2 mouse= and check that everything works correctly. Then try to isolate the problem.
    – AlexP
    Dec 12 '16 at 13:17














up vote
2
down vote

favorite












I have Vim version 8.0.122 on FreeBSD 9.3 (installed with pkg). I have default global vimrc. I want to disable mouse support completely on my account, so I put



 set mouse=


in my local .vimrc. It works, mouse is disabled, but also autoindent is gone, i.e. I press enter in a .php or .c file and I'm back at the begining of the line instead of current indent position.



I want to have both, mouse disabled, autoindent working as it used to. What should I do?










share|improve this question

















  • 1




    Please add to the post how you disabled it.
    – Rui F Ribeiro
    Dec 12 '16 at 13:08










  • They are not linked in any way. To debug, make a simple .vimrc file containing just set nocompatible, set all&, set ai bs=2 mouse= and check that everything works correctly. Then try to isolate the problem.
    – AlexP
    Dec 12 '16 at 13:17












up vote
2
down vote

favorite









up vote
2
down vote

favorite











I have Vim version 8.0.122 on FreeBSD 9.3 (installed with pkg). I have default global vimrc. I want to disable mouse support completely on my account, so I put



 set mouse=


in my local .vimrc. It works, mouse is disabled, but also autoindent is gone, i.e. I press enter in a .php or .c file and I'm back at the begining of the line instead of current indent position.



I want to have both, mouse disabled, autoindent working as it used to. What should I do?










share|improve this question













I have Vim version 8.0.122 on FreeBSD 9.3 (installed with pkg). I have default global vimrc. I want to disable mouse support completely on my account, so I put



 set mouse=


in my local .vimrc. It works, mouse is disabled, but also autoindent is gone, i.e. I press enter in a .php or .c file and I'm back at the begining of the line instead of current indent position.



I want to have both, mouse disabled, autoindent working as it used to. What should I do?







vim freebsd mouse indentation






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Dec 12 '16 at 12:52









user205111

111




111







  • 1




    Please add to the post how you disabled it.
    – Rui F Ribeiro
    Dec 12 '16 at 13:08










  • They are not linked in any way. To debug, make a simple .vimrc file containing just set nocompatible, set all&, set ai bs=2 mouse= and check that everything works correctly. Then try to isolate the problem.
    – AlexP
    Dec 12 '16 at 13:17












  • 1




    Please add to the post how you disabled it.
    – Rui F Ribeiro
    Dec 12 '16 at 13:08










  • They are not linked in any way. To debug, make a simple .vimrc file containing just set nocompatible, set all&, set ai bs=2 mouse= and check that everything works correctly. Then try to isolate the problem.
    – AlexP
    Dec 12 '16 at 13:17







1




1




Please add to the post how you disabled it.
– Rui F Ribeiro
Dec 12 '16 at 13:08




Please add to the post how you disabled it.
– Rui F Ribeiro
Dec 12 '16 at 13:08












They are not linked in any way. To debug, make a simple .vimrc file containing just set nocompatible, set all&, set ai bs=2 mouse= and check that everything works correctly. Then try to isolate the problem.
– AlexP
Dec 12 '16 at 13:17




They are not linked in any way. To debug, make a simple .vimrc file containing just set nocompatible, set all&, set ai bs=2 mouse= and check that everything works correctly. Then try to isolate the problem.
– AlexP
Dec 12 '16 at 13:17










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I faced a similar problem. This is what helped me solve it.
On my computer the vim settings which made many things pretty are stored in /usr/shar/vim/vim*/defaults.vim, but this file was read only if there is no ~/.vimrc. So if you can either copy this entire file to you ~/.vimrc, or if you are an admin and want to make a change for all users, modify the file itself. Just comment out the line which says set mouse=a.





share








New contributor




Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















    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: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    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%2f329800%2fdisabling-mouse-in-vim-disables-indentation%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













    I faced a similar problem. This is what helped me solve it.
    On my computer the vim settings which made many things pretty are stored in /usr/shar/vim/vim*/defaults.vim, but this file was read only if there is no ~/.vimrc. So if you can either copy this entire file to you ~/.vimrc, or if you are an admin and want to make a change for all users, modify the file itself. Just comment out the line which says set mouse=a.





    share








    New contributor




    Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      0
      down vote













      I faced a similar problem. This is what helped me solve it.
      On my computer the vim settings which made many things pretty are stored in /usr/shar/vim/vim*/defaults.vim, but this file was read only if there is no ~/.vimrc. So if you can either copy this entire file to you ~/.vimrc, or if you are an admin and want to make a change for all users, modify the file itself. Just comment out the line which says set mouse=a.





      share








      New contributor




      Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.



















        up vote
        0
        down vote










        up vote
        0
        down vote









        I faced a similar problem. This is what helped me solve it.
        On my computer the vim settings which made many things pretty are stored in /usr/shar/vim/vim*/defaults.vim, but this file was read only if there is no ~/.vimrc. So if you can either copy this entire file to you ~/.vimrc, or if you are an admin and want to make a change for all users, modify the file itself. Just comment out the line which says set mouse=a.





        share








        New contributor




        Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        I faced a similar problem. This is what helped me solve it.
        On my computer the vim settings which made many things pretty are stored in /usr/shar/vim/vim*/defaults.vim, but this file was read only if there is no ~/.vimrc. So if you can either copy this entire file to you ~/.vimrc, or if you are an admin and want to make a change for all users, modify the file itself. Just comment out the line which says set mouse=a.






        share








        New contributor




        Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.








        share


        share






        New contributor




        Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.









        answered 8 mins ago









        Sriram

        11




        11




        New contributor




        Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.





        New contributor





        Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.






        Sriram is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
        Check out our Code of Conduct.



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f329800%2fdisabling-mouse-in-vim-disables-indentation%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