Re: Fighting with comments - Close the gap between vimtutor and :help
Gary Johnson wrote: I don't think that's true. Vim :help comprises two manuals: Vim User Manual - :help user-manual Vim Reference Manual - :help reference This is even discussed in :help 01.1. The User Manual is written in a different style than the Reference Manual and is more readable. I believe the User Manual is intended to be the intermediate-level guide you're looking for. Regards, Gary Well, I said that's basically it, I didn't really want to go through the details of :help and analyse what's missing in it because I don't think there is anything missing in it. I'm more talking about a tutorial that will take you by the hand and bring you through the Vim universe in a nice and easy way to quote myself. I believe that an official well-written tutorial that goes nice and easy with lengthy descriptions and good examples is missing. Something to turn people from novices to Vim addict. I'm always surprised that not every single coder doesn't use Vim on an everyday basis. Especially when I can say that since I've made the effort to learn the 'basics' of the software, I code two to three times faster, even tho I believe I don't use more than 20% of Vim. I've also had a look at the FAQ as suggested by belgian compatriot Tony and I think that it could be the perfect start for a good tutorial. Yet the tutorial needs to be adressed to novices with the objective to get them hooked asap :) I'll be in touch with the FAQ team and see if it is possible to start such a project. Laurent
RE: Fighting with comments - Close the gap between vimtutor and :help
Gary Johnson wrote: I don't think that's true. Vim :help comprises two manuals: Vim User Manual - :help user-manual Vim Reference Manual - :help reference This is even discussed in :help 01.1. The User Manual is written in a different style than the Reference Manual and is more readable. I believe the User Manual is intended to be the intermediate-level guide you're looking for. Regards, Gary Well, I said that's basically it, I didn't really want to go through the details of :help and analyse what's missing in it because I don't think there is anything missing in it. I'm more talking about a tutorial that will take you by the hand and bring you through the Vim universe in a nice and easy way to quote myself. I believe that an official well-written tutorial that goes nice and easy with lengthy descriptions and good examples is missing. Something to turn people from novices to Vim addict. I'm always surprised that not every single coder doesn't use Vim on an everyday basis. Especially when I can say that since I've made the effort to learn the 'basics' of the software, I code two to three times faster, even tho I believe I don't use more than 20% of Vim. I've also had a look at the FAQ as suggested by belgian compatriot Tony and I think that it could be the perfect start for a good tutorial. Yet the tutorial needs to be adressed to novices with the objective to get them hooked asap :) I'll be in touch with the FAQ team and see if it is possible to start such a project. Laurent I agree, thats why I am reading 60 emails a day from the Vim list. Robert
Re: Fighting with comments - Close the gap between vimtutor and :help
On Oct 21, 2006, at 11:46 AM, Java Bob wrote: Gary Johnson wrote: I don't think that's true. Vim :help comprises two manuals: Vim User Manual - :help user-manual Vim Reference Manual - :help reference This is even discussed in :help 01.1. The User Manual is written in a different style than the Reference Manual and is more readable. I believe the User Manual is intended to be the intermediate-level guide you're looking for. Regards, Gary Well, I said that's basically it, I didn't really want to go through the details of :help and analyse what's missing in it because I don't think there is anything missing in it. I'm more talking about a tutorial that will take you by the hand and bring you through the Vim universe in a nice and easy way to quote myself. I believe that an official well-written tutorial that goes nice and easy with lengthy descriptions and good examples is missing. Something to turn people from novices to Vim addict. I'm always surprised that not every single coder doesn't use Vim on an everyday basis. Especially when I can say that since I've made the effort to learn the 'basics' of the software, I code two to three times faster, even tho I believe I don't use more than 20% of Vim. I've also had a look at the FAQ as suggested by belgian compatriot Tony and I think that it could be the perfect start for a good tutorial. Yet the tutorial needs to be adressed to novices with the objective to get them hooked asap :) I'll be in touch with the FAQ team and see if it is possible to start such a project. Laurent I agree, thats why I am reading 60 emails a day from the Vim list. Robert I'm an long time computer user but a relatively new user of Vim. At this point, I think I'm 'hooked', but I am somewhat troubled by how difficult it is to appreciate what Vim offers. About five years ago, I tried Vim and gave up, couldn't see the benefit and it sure seemed confusing with many options and settings. All detail; no structure was my reaction, and I didn't then have the time to invest in it. When I tried it this time I had the same initial reaction, but persevered and started to see some of the neat, efficient things it can do. What seems to me to be lacking is a fairly 'simple' set of concepts or examples that would have helped me understand what Vim offers. Not so simple that Vim appears to be 'just an other text editor' and not so complex or long that it seems like an overwhelming bucket of keystrokes. Given the flexibility of Vim, a longish document would be needed to describes its many features with examples, but that may not be the answer. If we want to make Vim enticing, I think brevity would be a virtue. Since a good sense of who the audience for a document is always important, possibly a series of shorter pieces focused on various activities: c coding, xml coding, scripting, network connections, etc. The list of titles/section headings in itself could give an idea of the scope and flexibility Vim provides. The current FAQ material might provide a good starting point, and it might be worth considering different packaging; for instance in a wiki format. Just my 2 cents worth. Hal
Re: Fighting with comments - Close the gap between vimtutor and :help
vim wrote: Hi everobody, I recently had a very similar conversation with three guys on #vim (irc.freenode.net). Basicaly, there is two official help for Vim: - the vimtutor - :help And that's basically it. :help being your Vim dictionnary/encyclopedia/bible, it's very complete and has everything in it but it's hardcore to read and understand. Unfortunately, it's not easy at all to go through and to 'get' the way it works. I believe that there is room between vimtutor and :help to have some beginner to intermediate tutorial that will take you by the hand and bring you through the Vim universe in a nice and easy way. Let's not forget (especially for the Vim gurus out there) that Vim is very powerful but because of that it can be very hard to understand sometimes or even to adapt to it and make it your favourite text editor. Of course Google is your friend but the sheer ammount of tutorials out there can easily make you go left, right and center and basically not teach you anything useful but some 'tips and tricks' that is cool but won't make you code faster or deeply understand Vim. So I think that there is room for some official tutorial after the vimtutor and before a perfect use of the ultimate :help. The tutorial will totally avoid to be a scientific precision on how-to-exactly-define-terms-the-best-way-possible-using-the-less-words-possible. The tutorial should be well written and take time to explain things to novice in simple words. The idea is to bring people to the Vim highway efficiently. Such a basic tutorial could _also_ help novices to avoid asking questions that will make any Vim guru feel like saying: 'RTFM' As an example, here are some topics proposed: Non-technical: - Phylosophy behind Vim Where you would learn why it will help you to be faster in your everyday coding and what the user has to understand to truely enjoy Vim (talk about the need to touch-type to be truely efficient for instance) - Phylosophy behind the three modes (Normal, Visual, Insert) - Phylosophy behind the command line mode - Differences between Vi and Vim - Explain the folder structure and how the various config files work - Differences between Vim on Windows, Mac, Linux, Unix and console use - Configure once, use everywhere (or how to adapt your config to a different platform) - etc. Technical: - The big apple : Think different! Where you would learn that you need to think gg instead of 'CTRL-home' or xp to invert the order of two letters etc. This could have a list of standard keyboard shortcuts mapped to a list of Vim shortcuts. - Basics of Vim variables (:set :let etc.) - My first function : hello world! - Basic understanding of filetypes - Basic folding - Basics of syntax highlighting - Basic mappings abbreviations - etc. Help! I need somebody - Phylosophy behind the :help command: how to 'think' :help - How to use :help efficiently - Good references to go one step further - etc. Of course, this is only a guide of what would be useful to a beginner but I firmy believe that some official tutorial is needed. Maybe this could be achieved by doing a 'best off' the various tutorials already available. Let me know what you think of this, Laurent I think that between the tutor and help, tere are also the vimFAQ and vimtips (both at vim-online). You seem to have interesting ideas. Maybe you should discuss them with the FAQ maintainer. Best regards, Tony.
Re: Fighting with comments - Close the gap between vimtutor and :help
vim [EMAIL PROTECTED] 写于 2006-10-20 15:50:36: Hi everobody, I believe that there is room between vimtutor and :help to have some beginner to intermediate tutorial that will take you by the hand and bring you through the Vim universe in a nice and easy way. There already is one close to your description. (Is it an official one? I don't know.) It's a PDF document and can be downloaded somewhere... I forget the name but it might be Vim Tutorial... When I've found it I'll post it again. -- Sincerely, Pan, Shi Zhu. ext: 2606
Re: Fighting with comments - Close the gap between vimtutor and :help
that would be very interesting I´m a little lazy, I like to learn things quickly. I really found that something is missing between the first tut and :help universe. I also like the idea of making people discover new things and understand why-it-works... vim-2 wrote: Hi everobody, I recently had a very similar conversation with three guys on #vim (irc.freenode.net). Basicaly, there is two official help for Vim: - the vimtutor - :help And that's basically it. :help being your Vim dictionnary/encyclopedia/bible, it's very complete and has everything in it but it's hardcore to read and understand. Unfortunately, it's not easy at all to go through and to 'get' the way it works. I believe that there is room between vimtutor and :help to have some beginner to intermediate tutorial that will take you by the hand and bring you through the Vim universe in a nice and easy way. Let's not forget (especially for the Vim gurus out there) that Vim is very powerful but because of that it can be very hard to understand sometimes or even to adapt to it and make it your favourite text editor. Of course Google is your friend but the sheer ammount of tutorials out there can easily make you go left, right and center and basically not teach you anything useful but some 'tips and tricks' that is cool but won't make you code faster or deeply understand Vim. So I think that there is room for some official tutorial after the vimtutor and before a perfect use of the ultimate :help. The tutorial will totally avoid to be a scientific precision on how-to-exactly-define-terms-the-best-way-possible-using-the-less-words-possible. The tutorial should be well written and take time to explain things to novice in simple words. The idea is to bring people to the Vim highway efficiently. Such a basic tutorial could _also_ help novices to avoid asking questions that will make any Vim guru feel like saying: 'RTFM' As an example, here are some topics proposed: Non-technical: - Phylosophy behind Vim Where you would learn why it will help you to be faster in your everyday coding and what the user has to understand to truely enjoy Vim (talk about the need to touch-type to be truely efficient for instance) - Phylosophy behind the three modes (Normal, Visual, Insert) - Phylosophy behind the command line mode - Differences between Vi and Vim - Explain the folder structure and how the various config files work - Differences between Vim on Windows, Mac, Linux, Unix and console use - Configure once, use everywhere (or how to adapt your config to a different platform) - etc. Technical: - The big apple : Think different! Where you would learn that you need to think gg instead of 'CTRL-home' or xp to invert the order of two letters etc. This could have a list of standard keyboard shortcuts mapped to a list of Vim shortcuts. - Basics of Vim variables (:set :let etc.) - My first function : hello world! - Basic understanding of filetypes - Basic folding - Basics of syntax highlighting - Basic mappings abbreviations - etc. Help! I need somebody - Phylosophy behind the :help command: how to 'think' :help - How to use :help efficiently - Good references to go one step further - etc. Of course, this is only a guide of what would be useful to a beginner but I firmy believe that some official tutorial is needed. Maybe this could be achieved by doing a 'best off' the various tutorials already available. Let me know what you think of this, Laurent A.J.Mechelynck wrote: Meghdad Azriel wrote: I was just kidding ;) I know that they are not secret but, they´re not that intuitive... and i´m still learning how to use that help effectivelly... maybe I neet to read those basic files with care... [...] To use the help effectively, one should learn to use the tools Vim itself includes to search the help (see, among others, :help :help and :help :helpgrep): :help topic brings you to the help for topic if there is one, otherwise to some help topic resembling what you typed :help patternTab completes your command-line with the first help topic matching the pattern. Hit Tab again to see the next one. Hit Ctrl-D to see them all. If you have 'wildmenu' on, the bottom status line will be replaced by a menu of possible matches: hit Left or Right to select, Enter to accept, Esc to abort. :helpgrep pattern searches the whole help text for /pattern/. The results are used to build a quickfix error list (see :help quickfix.txt). Then the following commands may come useful: :cn[ext] :cp[revious] or :cN[ext] :cnf[ile] :cpf[ile] or :cNf[ile] :cfir[st] or :cr[ewind] :cla[st] to navigate the list, displaying the helpfiles with the cursor on a match; :cope[n] to open the list of matching lines in its own split-window, where you can position
Re: Fighting with comments - Close the gap between vimtutor and :help
Meghdad Azriel wrote: that would be very interesting I´m a little lazy, I like to learn things quickly. I really found that something is missing between the first tut and :help universe. I actually appreciate the idea of making people discover new things and understand why-it-works... (forgive my english :P) vim-2 wrote: Hi everobody, I recently had a very similar conversation with three guys on #vim (irc.freenode.net). Basicaly, there is two official help for Vim: - the vimtutor - :help And that's basically it. :help being your Vim dictionnary/encyclopedia/bible, it's very complete and has everything in it but it's hardcore to read and understand. Unfortunately, it's not easy at all to go through and to 'get' the way it works. I believe that there is room between vimtutor and :help to have some beginner to intermediate tutorial that will take you by the hand and bring you through the Vim universe in a nice and easy way. Let's not forget (especially for the Vim gurus out there) that Vim is very powerful but because of that it can be very hard to understand sometimes or even to adapt to it and make it your favourite text editor. Of course Google is your friend but the sheer ammount of tutorials out there can easily make you go left, right and center and basically not teach you anything useful but some 'tips and tricks' that is cool but won't make you code faster or deeply understand Vim. So I think that there is room for some official tutorial after the vimtutor and before a perfect use of the ultimate :help. The tutorial will totally avoid to be a scientific precision on how-to-exactly-define-terms-the-best-way-possible-using-the-less-words-possible. The tutorial should be well written and take time to explain things to novice in simple words. The idea is to bring people to the Vim highway efficiently. Such a basic tutorial could _also_ help novices to avoid asking questions that will make any Vim guru feel like saying: 'RTFM' As an example, here are some topics proposed: Non-technical: - Phylosophy behind Vim Where you would learn why it will help you to be faster in your everyday coding and what the user has to understand to truely enjoy Vim (talk about the need to touch-type to be truely efficient for instance) - Phylosophy behind the three modes (Normal, Visual, Insert) - Phylosophy behind the command line mode - Differences between Vi and Vim - Explain the folder structure and how the various config files work - Differences between Vim on Windows, Mac, Linux, Unix and console use - Configure once, use everywhere (or how to adapt your config to a different platform) - etc. Technical: - The big apple : Think different! Where you would learn that you need to think gg instead of 'CTRL-home' or xp to invert the order of two letters etc. This could have a list of standard keyboard shortcuts mapped to a list of Vim shortcuts. - Basics of Vim variables (:set :let etc.) - My first function : hello world! - Basic understanding of filetypes - Basic folding - Basics of syntax highlighting - Basic mappings abbreviations - etc. Help! I need somebody - Phylosophy behind the :help command: how to 'think' :help - How to use :help efficiently - Good references to go one step further - etc. Of course, this is only a guide of what would be useful to a beginner but I firmy believe that some official tutorial is needed. Maybe this could be achieved by doing a 'best off' the various tutorials already available. Let me know what you think of this, Laurent A.J.Mechelynck wrote: Meghdad Azriel wrote: I was just kidding ;) I know that they are not secret but, they´re not that intuitive... and i´m still learning how to use that help effectivelly... maybe I neet to read those basic files with care... [...] To use the help effectively, one should learn to use the tools Vim itself includes to search the help (see, among others, :help :help and :help :helpgrep): :help topic brings you to the help for topic if there is one, otherwise to some help topic resembling what you typed :help patternTab completes your command-line with the first help topic matching the pattern. Hit Tab again to see the next one. Hit Ctrl-D to see them all. If you have 'wildmenu' on, the bottom status line will be replaced by a menu of possible matches: hit Left or Right to select, Enter to accept, Esc to abort. :helpgrep pattern searches the whole help text for /pattern/. The results are used to build a quickfix error list (see :help quickfix.txt). Then the following commands may come useful: :cn[ext] :cp[revious] or :cN[ext] :cnf[ile] :cpf[ile] or :cNf[ile] :cfir[st] or :cr[ewind] :cla[st] to navigate the list, displaying the helpfiles with the cursor on a match; :cope[n] to open
Re: Fighting with comments
On 10/18/06, Gary Johnson [EMAIL PROTECTED] wrote: The way to fix this problem is to create two new directories: $VIM\vimfiles\after $VIM\vimfiles\after\ftplugin on Windows or ~/.vim/after ~/.vim/after/ftplugin on Unix. Then create a new file in the after/ftplugin directory named php.vim and put in it those commands that fix the problem, e.g., setlocal nosta setlocal noai setlocal nosi An alternative to creating ~/.vimrc/after/ftplugin/php.vim is to put it in your ~/.vimrc, using the autocmd FileType feature, like this: autocmd! FileType php setlocal nosta | setlocal noai | setlocal nosi For example, I have this: autocmd! FileType perl FileTypePerl command! FileTypePerl setlocal makeprg=perl\ -c\ % \ | let perl_extended_vars=1 \ | setlocal keywordprg=perldoc\ -f \ | setlocal cindent \ | setlocal errorformat= \%-G%.%#had\ compilation\ errors., \%-G%.%#syntax\ OK, \%m\ at\ %f\ line\ %l., \%+A%.%#\ at\ %f\ line\ %l\\,%.%#, \%+C%.%# -- Rodolfo Borges
Re: Fighting with comments - Close the gap between vimtutor and :help
I find that the problem is that I installed gVim the first time and I was already thinking about how making it highlight the codes, highlight errors, auto complete control structures, tags and functions... I'm trying to find out if there is a way to make vim show tips automatically, tips about function parameters, classes, method... I wanna be a guru in a blink of eyes :P H-10 wrote: On Oct 20, 2006, at 1:39 AM, A.J.Mechelynck wrote: vim wrote: Hi everobody, I recently had a very similar conversation with three guys on #vim (irc.freenode.net). Basicaly, there is two official help for Vim: - the vimtutor - :help And that's basically it. :help being your Vim dictionnary/encyclopedia/bible, it's very complete and has everything in it but it's hardcore to read and understand. Unfortunately, it's not easy at all to go through and to 'get' the way it works. I believe that there is room between vimtutor and :help to have some beginner to intermediate tutorial that will take you by the hand and bring you through the Vim universe in a nice and easy way. Let's not forget (especially for the Vim gurus out there) that Vim is very powerful but because of that it can be very hard to understand sometimes or even to adapt to it and make it your favourite text editor. Of course Google is your friend but the sheer ammount of tutorials out there can easily make you go left, right and center and basically not teach you anything useful but some 'tips and tricks' that is cool but won't make you code faster or deeply understand Vim. So I think that there is room for some official tutorial after the vimtutor and before a perfect use of the ultimate :help. The tutorial will totally avoid to be a scientific precision on how-to- exactly-define-terms-the-best-way-possible-using-the-less-words- possible. The tutorial should be well written and take time to explain things to novice in simple words. The idea is to bring people to the Vim highway efficiently. Such a basic tutorial could _also_ help novices to avoid asking questions that will make any Vim guru feel like saying: 'RTFM' As an example, here are some topics proposed: Non-technical: - Phylosophy behind Vim Where you would learn why it will help you to be faster in your everyday coding and what the user has to understand to truely enjoy Vim (talk about the need to touch-type to be truely efficient for instance) - Phylosophy behind the three modes (Normal, Visual, Insert) - Phylosophy behind the command line mode - Differences between Vi and Vim - Explain the folder structure and how the various config files work - Differences between Vim on Windows, Mac, Linux, Unix and console use - Configure once, use everywhere (or how to adapt your config to a different platform) - etc. Technical: - The big apple : Think different! Where you would learn that you need to think gg instead of 'CTRL-home' or xp to invert the order of two letters etc. This could have a list of standard keyboard shortcuts mapped to a list of Vim shortcuts. - Basics of Vim variables (:set :let etc.) - My first function : hello world! - Basic understanding of filetypes - Basic folding - Basics of syntax highlighting - Basic mappings abbreviations - etc. Help! I need somebody - Phylosophy behind the :help command: how to 'think' :help - How to use :help efficiently - Good references to go one step further - etc. Of course, this is only a guide of what would be useful to a beginner but I firmy believe that some official tutorial is needed. Maybe this could be achieved by doing a 'best off' the various tutorials already available. Let me know what you think of this, Laurent I think that between the tutor and help, tere are also the vimFAQ and vimtips (both at vim-online). You seem to have interesting ideas. Maybe you should discuss them with the FAQ maintainer. Best regards, Tony. Hi, As one of the potential beneficiaries of the proposed document, I'd like to add that what I have a hard time finding are the 'philosophy' items mentioned in the proposal. I'd like to get a better understanding of the way Vim views text, what the modes are for, etc. i.e. the bigger picture. I find :help to be excellent when I know what question to ask, but often lack the context to know where best to look. Reading this list helps fill in the concepts in an ad hoc sort of way, but a more systematic exposition would be nice. HTH, Hal -- View this message in context: http://www.nabble.com/Fighting-with-comments-tf2467964.html#a6924420 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Fighting with comments - Close the gap between vimtutor and :help
Meghdad Azriel wrote: [...] I wanna be a guru in a blink of eyes :P [...] You can't: TANSTAAFL. (And if you haven't read R. A. Heinlein's /The Moon is a Harsh Mistress/, TANSTAAFL is an acronym for: 'T ain't no such thing as a free lunch.) The only way to become a guru is by hard labour: attentively studying whatever documentation is available (and in Vim's case, there's no lack of it), hands-on experience (trying various things and seeing what they do) and, if you know the programming language, peering through the code. Best regards, Tony.
Re: Fighting with comments
My gvim version is 7.0 eric1235711 wrote: Hello I´m PHP programmer and I started programming in gVim last weak, and I´m liking it very much But I got a trouble... When I´m commenting (// or /* or #) and I type SPACE it breaks the line automatically. Always I start a comment, i have to go to normal mode and type :set nostaCR :set noaiCR :set nosiCR I find that only nosta or nosi is enought to make it stop breaking the line automatically, but I want to configure to it stop doing it forever... I took a look in syntax/php.vim but I just don´t know where correct it... Do you have any idea of how I fix it? -- View this message in context: http://www.nabble.com/Fighting-with-comments-tf2467964.html#a6895768 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Fighting with comments
here it's in this way: C:/Program Files/Vim and it contains vim70/ and vimfiles/ Oh, thanks, Gary! it worked!!! But I didn´t like it!!! when I changed C:/Program Files/Vim/vimfiles/ftplugin/php.vim it stoped 'autowriting' comments in new lines... but when I changed C:/Program Files/Vim/vimfiles/after/ftplugin/php.vim it worked perfectly... I didn´t undertand... why did it work? Gary Johnson wrote: On 2006-10-18, eric1235711 [EMAIL PROTECTED] wrote: First of all, don't alter any of the files that are in the $VIMRUNTIME directory. For Vim-7.0 on Windows, this is commonly C:\Program Files\Vim\vim70 Doing so will cause you to lose those changes when you upgrade your vim installation. The way to fix this problem is to create two new directories: $VIM\vimfiles\after $VIM\vimfiles\after\ftplugin on Windows or ~/.vim/after ~/.vim/after/ftplugin on Unix. Then create a new file in the after/ftplugin directory named php.vim and put in it those commands that fix the problem, e.g., setlocal nosta setlocal noai setlocal nosi Note the use of setlocal instead of set. This will keep those changes local to your PHP buffer(s) so that you can use other settings in other buffers you might have open at the same time. See: :help ftplugin-overrule :help ftplugin HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA -- View this message in context: http://www.nabble.com/Fighting-with-comments-tf2467964.html#a6896080 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Fighting with comments
this worked too I think this is better, help tells that this formatoptions is specific to coments and things... But I´m getting disgusted of these secret and magic commands... thaks Peter Hodge-2 wrote: --- Gary Johnson [EMAIL PROTECTED] wrote: On 2006-10-18, eric1235711 [EMAIL PROTECTED] wrote: Yakov Lerner-3 wrote: On 10/18/06, eric1235711 [EMAIL PROTECTED] wrote: Hello I´m PHP programmer and I started programming in gVim last weak, and I´m liking it very much But I got a trouble... When I´m commenting (// or /* or #) and I type SPACE it breaks the line automatically. Always I start a comment, i have to go to normal mode and type :set nostaCR :set noaiCR :set nosiCR I find that only nosta or nosi is enought to make it stop breaking the line automatically, but I want to configure to it stop doing it forever... I took a look in syntax/php.vim but I just don´t know where correct it... Do you have any idea of how I fix it? Does this help: :set tw=0 ? I can fix it when I´m programming, i´m doing it... but I´m getting tired of doing that. I want to alter the syntax file (or what ever else) to fix it permanently. First of all, don't alter any of the files that are in the $VIMRUNTIME directory. For Vim-7.0 on Windows, this is commonly C:\Program Files\Vim\vim70 Doing so will cause you to lose those changes when you upgrade your vim installation. The way to fix this problem is to create two new directories: $VIM\vimfiles\after $VIM\vimfiles\after\ftplugin on Windows or ~/.vim/after ~/.vim/after/ftplugin on Unix. Then create a new file in the after/ftplugin directory named php.vim and put in it those commands that fix the problem, e.g., setlocal nosta setlocal noai setlocal nosi I wouldn't have thought those options would make a difference? You should be able to just use (in after/ftplugin/php.vim): don't auto-wrap text setlocal formatoptions-=t don't auto-wrap comments either. setlocal formatoptions-=c regards, Peter On Yahoo!7 Men's Health Radio: Chill out or work out, or just tune in http://au.launch.yahoo.com/mens-health-radio/index.html -- View this message in context: http://www.nabble.com/Fighting-with-comments-tf2467964.html#a6896241 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Fighting with comments
On 2006-10-19, eric1235711 [EMAIL PROTECTED] wrote: here it's in this way: C:/Program Files/Vim and it contains vim70/ and vimfiles/ Oh, thanks, Gary! it worked!!! But I didn´t like it!!! when I changed C:/Program Files/Vim/vimfiles/ftplugin/php.vim it stoped 'autowriting' comments in new lines... but when I changed C:/Program Files/Vim/vimfiles/after/ftplugin/php.vim it worked perfectly... I didn´t undertand... why did it work? You're welcome. Take a look at: :help rtp When you load a buffer that vim determines to be of filetype php, vim searches the runtimepath for filetype plugins to source. It will source your C:/Program Files/Vim/vimfiles/ftplugin/php.vim, then the C:/Program Files/Vim/vim70/ftplugin/php.vim that came with the vim distribution, then your C:/Program Files/Vim/vimfiles/after/ftplugin/php.vim. So, settings that you put in C:/Program Files/Vim/vimfiles/ftplugin/php.vim may be overridden by the settings in C:/Program Files/Vim/vim70/ftplugin/php.vim, but since C:/Program Files/Vim/vimfiles/after/ftplugin/php.vim is sourced last, its settings will win. I hope that helps explain what you're seeing. Regards, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
Re: Fighting with comments
On 2006-10-19, eric1235711 [EMAIL PROTECTED] wrote: this worked too I think this is better, help tells that this formatoptions is specific to coments and things... But I´m getting disgusted of these secret and magic commands... Secret? You might find it helpful to look at :help user-manual and browsing the table of contents for topics that appear related to what you're trying to do. Regards, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
Re: Fighting with comments
I was just kidding ;) I know that they are not secret but, they´re not that intuitive... and i´m still learning how to use that help effectivelly... maybe I neet to read those basic files with care... Gary Johnson wrote: On 2006-10-19, eric1235711 [EMAIL PROTECTED] wrote: this worked too I think this is better, help tells that this formatoptions is specific to coments and things... But I´m getting disgusted of these secret and magic commands... Secret? You might find it helpful to look at :help user-manual and browsing the table of contents for topics that appear related to what you're trying to do. Regards, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA -- View this message in context: http://www.nabble.com/Fighting-with-comments-tf2467964.html#a6905899 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Fighting with comments
On 10/18/06, eric1235711 [EMAIL PROTECTED] wrote: Hello I´m PHP programmer and I started programming in gVim last weak, and I´m liking it very much But I got a trouble... When I´m commenting (// or /* or #) and I type SPACE it breaks the line automatically. Always I start a comment, i have to go to normal mode and type :set nostaCR :set noaiCR :set nosiCR I find that only nosta or nosi is enought to make it stop breaking the line automatically, but I want to configure to it stop doing it forever... I took a look in syntax/php.vim but I just don´t know where correct it... Do you have any idea of how I fix it? Does this help: :set tw=0 ? Yakov
Re: Fighting with comments
Hello Yakov I can fix it when I´m programming, i´m doing it... but I´m getting tired of doing that. I want to alter the syntax file (or what ever else) to fix it permanently. Yakov Lerner-3 wrote: On 10/18/06, eric1235711 [EMAIL PROTECTED] wrote: Hello I´m PHP programmer and I started programming in gVim last weak, and I´m liking it very much But I got a trouble... When I´m commenting (// or /* or #) and I type SPACE it breaks the line automatically. Always I start a comment, i have to go to normal mode and type :set nostaCR :set noaiCR :set nosiCR I find that only nosta or nosi is enought to make it stop breaking the line automatically, but I want to configure to it stop doing it forever... I took a look in syntax/php.vim but I just don´t know where correct it... Do you have any idea of how I fix it? Does this help: :set tw=0 ? Yakov -- View this message in context: http://www.nabble.com/Fighting-with-comments-tf2467964.html#a6884075 Sent from the Vim - General mailing list archive at Nabble.com.
Re: Fighting with comments
On 2006-10-18, eric1235711 [EMAIL PROTECTED] wrote: Yakov Lerner-3 wrote: On 10/18/06, eric1235711 [EMAIL PROTECTED] wrote: Hello I´m PHP programmer and I started programming in gVim last weak, and I´m liking it very much But I got a trouble... When I´m commenting (// or /* or #) and I type SPACE it breaks the line automatically. Always I start a comment, i have to go to normal mode and type :set nostaCR :set noaiCR :set nosiCR I find that only nosta or nosi is enought to make it stop breaking the line automatically, but I want to configure to it stop doing it forever... I took a look in syntax/php.vim but I just don´t know where correct it... Do you have any idea of how I fix it? Does this help: :set tw=0 ? I can fix it when I´m programming, i´m doing it... but I´m getting tired of doing that. I want to alter the syntax file (or what ever else) to fix it permanently. First of all, don't alter any of the files that are in the $VIMRUNTIME directory. For Vim-7.0 on Windows, this is commonly C:\Program Files\Vim\vim70 Doing so will cause you to lose those changes when you upgrade your vim installation. The way to fix this problem is to create two new directories: $VIM\vimfiles\after $VIM\vimfiles\after\ftplugin on Windows or ~/.vim/after ~/.vim/after/ftplugin on Unix. Then create a new file in the after/ftplugin directory named php.vim and put in it those commands that fix the problem, e.g., setlocal nosta setlocal noai setlocal nosi Note the use of setlocal instead of set. This will keep those changes local to your PHP buffer(s) so that you can use other settings in other buffers you might have open at the same time. See: :help ftplugin-overrule :help ftplugin HTH, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
Re: Fighting with comments
--- Gary Johnson [EMAIL PROTECTED] wrote: On 2006-10-18, eric1235711 [EMAIL PROTECTED] wrote: Yakov Lerner-3 wrote: On 10/18/06, eric1235711 [EMAIL PROTECTED] wrote: Hello I´m PHP programmer and I started programming in gVim last weak, and I´m liking it very much But I got a trouble... When I´m commenting (// or /* or #) and I type SPACE it breaks the line automatically. Always I start a comment, i have to go to normal mode and type :set nostaCR :set noaiCR :set nosiCR I find that only nosta or nosi is enought to make it stop breaking the line automatically, but I want to configure to it stop doing it forever... I took a look in syntax/php.vim but I just don´t know where correct it... Do you have any idea of how I fix it? Does this help: :set tw=0 ? I can fix it when I´m programming, i´m doing it... but I´m getting tired of doing that. I want to alter the syntax file (or what ever else) to fix it permanently. First of all, don't alter any of the files that are in the $VIMRUNTIME directory. For Vim-7.0 on Windows, this is commonly C:\Program Files\Vim\vim70 Doing so will cause you to lose those changes when you upgrade your vim installation. The way to fix this problem is to create two new directories: $VIM\vimfiles\after $VIM\vimfiles\after\ftplugin on Windows or ~/.vim/after ~/.vim/after/ftplugin on Unix. Then create a new file in the after/ftplugin directory named php.vim and put in it those commands that fix the problem, e.g., setlocal nosta setlocal noai setlocal nosi I wouldn't have thought those options would make a difference? You should be able to just use (in after/ftplugin/php.vim): don't auto-wrap text setlocal formatoptions-=t don't auto-wrap comments either. setlocal formatoptions-=c regards, Peter On Yahoo!7 Men's Health Radio: Chill out or work out, or just tune in http://au.launch.yahoo.com/mens-health-radio/index.html