Re: enable modeline in vim
Patrick wrote: > > > > > > > > Do you know how to enable modelines in vim running from root? Even if > > > > I put "set modeline" in /root/.vimrc, the output of ":set modeline?" > > > > still shows "nomodeline". At the same time, "set modeline" in ~/.vimrc > > > > works for all other accounts except root. > > > > > > > > Someone has protected the root account so tightly that I cannot even > > > > shoot myself in the leg. Do you know how I could override this > > > > protection? > > > > > > > > > > In my vimrc i have next: > > > set modeline > > > set modelines=3 > > > > > > > > > As I said, in /root/.vimrc I have: > > > > set modeline > > set modelines=5 > > > > > And it works, no matter from root or normal user. Hope this helps. > > > > And it does not work for root. vim-7.3.556_1 > > > > Surely I am doing something stupid but I cannot figure out what. > Assuming you've installed vim from the ports tree, > /usr/local/share/vim/vimrc is the shared vimrc file amongst all > users. Have you tried setting it in there? I have finally found the cause of the trouble. There was a "set nocompatible" command in ~/.vimrc after the "set modeline" command. According to the documentation, the "compatible" option modifies many other options, including the "modeline" options. The solution is to put the "set nocompatible" command at the very start of the ~/.vimrc file (as the documentation recommends) or to remove it altogether. -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN sip:suda...@sibptus.tomsk.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: enable modeline in vim
Assuming you've installed vim from the ports tree, /usr/local/share/vim/vimrc is the shared vimrc file amongst all users. Have you tried setting it in there? On Monday, 16 July, 2012 at 09:37 , Victor Sudakov wrote: > Виталий Туровец wrote: > > > > > > Do you know how to enable modelines in vim running from root? Even if > > > I put "set modeline" in /root/.vimrc, the output of ":set modeline?" > > > still shows "nomodeline". At the same time, "set modeline" in ~/.vimrc > > > works for all other accounts except root. > > > > > > Someone has protected the root account so tightly that I cannot even > > > shoot myself in the leg. Do you know how I could override this > > > protection? > > > > > > > In my vimrc i have next: > > set modeline > > set modelines=3 > > > > > As I said, in /root/.vimrc I have: > > set modeline > set modelines=5 > > > And it works, no matter from root or normal user. Hope this helps. > > And it does not work for root. vim-7.3.556_1 > > Surely I am doing something stupid but I cannot figure out what. > > -- > Victor Sudakov, VAS4-RIPE, VAS47-RIPN > sip:suda...@sibptus.tomsk.ru (mailto:suda...@sibptus.tomsk.ru) > ___ > freebsd-questions@freebsd.org (mailto:freebsd-questions@freebsd.org) mailing > list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org > (mailto:freebsd-questions-unsubscr...@freebsd.org)" > > ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: enable modeline in vim
Виталий Туровец wrote: > > > > Do you know how to enable modelines in vim running from root? Even if > > I put "set modeline" in /root/.vimrc, the output of ":set modeline?" > > still shows "nomodeline". At the same time, "set modeline" in ~/.vimrc > > works for all other accounts except root. > > > > Someone has protected the root account so tightly that I cannot even > > shoot myself in the leg. Do you know how I could override this > > protection? > > > In my vimrc i have next: > set modeline > set modelines=3 > As I said, in /root/.vimrc I have: set modeline set modelines=5 > And it works, no matter from root or normal user. Hope this helps. And it does not work for root. vim-7.3.556_1 Surely I am doing something stupid but I cannot figure out what. -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN sip:suda...@sibptus.tomsk.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
Re: enable modeline in vim
2012/7/16 Victor Sudakov : > Colleagues, > > Do you know how to enable modelines in vim running from root? Even if > I put "set modeline" in /root/.vimrc, the output of ":set modeline?" > still shows "nomodeline". At the same time, "set modeline" in ~/.vimrc > works for all other accounts except root. > > Someone has protected the root account so tightly that I cannot even > shoot myself in the leg. Do you know how I could override this > protection? > > -- > Victor Sudakov, VAS4-RIPE, VAS47-RIPN > sip:suda...@sibptus.tomsk.ru > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org" In my vimrc i have next: set modeline set modelines=3 And it works, no matter from root or normal user. Hope this helps. -- ~~~ WBR, Vitaliy Turovets Systems Administrator Corebug.Net +38(093)265-70-55 VITU-RIPE X-NCC-RegID: ua.tv ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"
enable modeline in vim
Colleagues, Do you know how to enable modelines in vim running from root? Even if I put "set modeline" in /root/.vimrc, the output of ":set modeline?" still shows "nomodeline". At the same time, "set modeline" in ~/.vimrc works for all other accounts except root. Someone has protected the root account so tightly that I cannot even shoot myself in the leg. Do you know how I could override this protection? -- Victor Sudakov, VAS4-RIPE, VAS47-RIPN sip:suda...@sibptus.tomsk.ru ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"