Re: execute command without adding it to command history
On 11/4/06, Yegappan Lakshmanan <[EMAIL PROTECTED]> wrote: Hi Yakov, On 11/3/06, Yakov Lerner <[EMAIL PROTECTED]> wrote: > On 11/3/06, Yegappan Lakshmanan <[EMAIL PROTECTED]> wrote: > > Hi Yakov, > > > > On 11/3/06, Yakov Lerner <[EMAIL PROTECTED]> wrote: > > > How do I execute command without adding it to command > > > history ? (I need it for the command on the rhs of the mappnig) > > > > > > > You can try using "call histdel('cmd', -1)" after executing a command > > from your map. > > And won't the ':call histdel('cmd', -1)' iself remain in the history then ? > From the help for "cmdline-history", commands invoked from maps will not be added to the history. Are you using a normal or insert or visual or command-line mode map? - Yegappan I have command executed via feedkeys() in rhs of mapping, and these commands do appear in command history. Yakov
Re: Problem with tabs in vim 7
On Fri, 3 Nov 2006, A.J.Mechelynck wrote: > Cezary Kułakowski wrote: > > Hi, > > > >I've recently updated my vim to 7.0.17 version (from some 6 version) > > and I have very annoying problem with it: when I write some code in C++ > > vim doesn't add new tab after I make new scope (by "{\n") and doesn't > > remove one tab after I close scope("}\n"). Can anybody met this problem > > before? > > > > Thanks in advance, > > Cezary Kulakowski > > > > When you ask > > :filetype > > does the reply include "indent:OFF" ? > > If it does, I recommend adding > > runtime vimrc_example.vim > > near the top of your vimrc. If that's not enough, remove any "filetype indent > off" in that same vimrc. > > see ":help :filetype" > > > Best regards, > Tony. > Yep, that was the problem(indenting off). After making changes in vimrc everything's ok :). Thanks a lot, Czarek
Re: Getting out of netrw
On Friday 03 November 2006 22:14, Charles E Campbell Jr wrote: > > Or you could use :Texplore to open a netrw-browser in a new tab! > And so we learn new things every day ;) Thanks Marius
ANN: VST 1.4
Hello, Vim7 required. VST is script which makes possible to export text files with simple markup to HTML, LaTeX or HTML S5 presentation format to create even complex documents. Script doesn't require any external dependency and will work on any platform Vim7 is available. VST is Vim only implementation of reStructuredText. Latest version of script files and documentation in text form: http://skawina.eu.org/mikolaj/vst.zip ChangeLog ' - 31 Oct 2006 - **1.3** announcement - FIX: Vst link broken - FIX: & in URLs double encoded - FIX: broken chained links with uppercase letters List of changes with working links to documentation: http://skawina.eu.org/mikolaj/vst.html#lchangelog Supported elements of inline markup: - emphasised text (italic) - strongly emphasised text (bold) - hyperlinks (in various syntax forms) - custom decorations (among them: sub, sup, big, small) Elements of documents structure: - paragraphs - block quotes - ordered lists - unordered lists - option lists - footnotes - citations - images - preformatted text - colorized preformatted text (HTML export only) - tables - admonitions - table of contents Also bunch of auxiliary commands which should ease writing of document and navigating (folding, text table of contents, lists or declared links, replacements) Latest version of script files and documentation in text form: http://skawina.eu.org/mikolaj/vst.zip To install, place archive in ~/.vim directory and unpack it there. Following versions of help file was produced without any modifications to HTML or LaTeX source: HTML: http://skawina.eu.org/mikolaj/vst.html LaTeX file exported from vst.txt: http://skawina.eu.org/mikolaj/vst.tex PDF file produced from vst.tex: http://skawina.eu.org/mikolaj/vst.pdf m.
Re: File type retention
On Fri, Nov 03, 2006 at 11:12:19AM -0700, Daryl Lee wrote: > This may be a Windows issue, but maybe someone here can help me solve it. > Using gVim, when I open a file with .h extension and then try to open > another .h file, the FileOpen dialog has the file filter set to > "*.cpp,*.c++". I have to manually force it back to either All or *.h. Is > there some way to override that behavior? I'd prefer "All", which is the > equivalent of what I get on Linux under KDE, where there is no filter at > all in the FileOpen dialog. Have you (or some script) set a (global or buffer-local) browsefilter variable? :echo g:browsefilter :echo b:browsefilter (If both commands generate errors, then the answer is no.) If I read :help browsefilter correctly, then the simplest solution is to add :let g:browsefilter = "All Files\t*.*\n" to your vimrc file. A more complicated solution is to add something like :let b:browsefilter = "C files\t*.c;*.h;*.cpp;*.c++All Files\t*.*\n" to an ftplugin for C files. Ask again if you need more details. HTH --Benji Fisher P.S. It seems that b:browsefilter *is* set in the default ftplugin (but only on Windows systems). So see :help ftplugin-overrule
Re: noimd don't works under linux
On Fri, Nov 03, 2006 at 09:45:22PM +0800, Eddy Zhao wrote: > Hi All, > > I Have the below configuration in vimrc >inoremap :set imd >nnoremap i :set noimdi > > Press "Esc" to change from insert mode to normal mode DO > disable the input method. > > But after that, when I press "i" to change from normal mode > back to insert mode, the input method is not enbabled (in > other words, I have to press C-SPACE to bring back the input > method). > > I've tried on below software enviroment, all doesn't get things > work (vim is with xim support) > - fc5+ion3+scim+vim7.0(selfbuild & officalrpm) > - fc6+gnome+scim+vim7.0(selfbuild & officalrpm) > > Meanwhile, the configuration works on windows. > > I've posted on mailing list similar problem before, but get no > solution, the feature is so important, so I'm posting it again. > Hope someone have the solution. > > Thanks > Eddy I tried this on FC2: :set stl=%{&imd} :inoremap :set imd :nnoremap i :set noimdi The first line (along with my usual :set laststatus=2) means that I can check my 'imd' setting in the status line. When I go between Normal and Insert modes with i and , it changes from 1 to 0 and back, so I think it is working. Please try this and see whether you get anything different. Also, try it with $ vim -u NONE :set nocp If you get the same results but are still having trouble, then the problem might be some other setting. HTH --Benji Fisher
gvim cut paste selection
Hi , I was having problem with cut-paste selections from X <-> Windows for gvim (6.2) , and this is the reply I got from the RealVNC team . So is there a way to solve this in gvim ? Thanks in advance ! -Ujjal -- Forwarded message -- From: James Weatherall <[EMAIL PROTECTED]> Date: Nov 3, 2006 9:59 PM Subject: RE: Xvnc cut paste problem To: Ujjal Bose <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Hi Ujjal, It sounds like gvim doesn't set the timestamp on the X selection correctly when it sets it, so vncconfig doesn't think it's changed. Selecting text in another X application, then selecting the desired text in gvim should cause vncconfig to see the selection ownership change and to then send the gvim text to the viewer. Cheers, Wez @ RealVNC Ltd. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ujjal Bose Sent: 01 November 2006 19:09 To: [EMAIL PROTECTED] Subject: Xvnc cut paste problem For the laste few days my cut paste selections from Unix->Windows is not working properly but Windows->Unix works perfectly. I was using "autocutsel" to enable cut-paste between various X11 selections, and also had a line for "vncconfig -nowin -iconic" in my VNC xstartup file but nothing seems to help. 0) I am using Xvnc 4.2.1 server in my Linux m/c and TightVNC viewer on Windows XP side. 1) A "Copy" selection from a unix application (gvim) seems to work intermittently. 2) If I do a mouse based visual selection (also called PRIMARY selection in X11) from my gvim windows , and paste it in Windows notepad, only a partial paste happens for the first time, and then onwards , the same stuff is pasted over and over again, in spite of selecting some other text in gvim. 3) Pasting from xterm->Notepad(Windows) seems to work correctly. 4) I even started a new VNC session on another Linux m/c (same xstartup file) but didnt help. 5) Another thing I observed : from gvim , irrespective of my selection method ("copy" or mouse based) , the paste in Notepad seems to work only (partially in case of mouse selection and fully in case of "Copy") for the first time. If I select something else now and then try to paste , the last stuff only gets pasted. BUT IF I COPY BACK SOME TEXT FROM WINDOWS->UNIX and then try again , IT WORKS FOR THE NEW SELECTION , but again , only for once, till I repeat the process. 6) Again, pasting from xterm always works perfectly. Any help appreciated. -Ujjal # My xstartup file vncconfig -nowin & if ($OSTYPE == "Linux") then # Linux xrdb $HOME/.Xresources \xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #/usr/bin/gnome-session & #/usr/bin/startkde & #fvwm2 & /home/ubose/local/bin/startxfce4 & xhost + else # sun xrdb $HOME/.Xresources xrdb -load glx \xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & xsetroot -solid grey #/usr/dt/bin/dtwm& /usr/dt/bin/Xsession & xhost + endif ###
Re: Getting out of netrw
Hi, On 11/3/06, Jean-Rene David <[EMAIL PROTECTED]> wrote: Say I open vim7's new super duper file explorer "netrw" to browse some local directory. Say then I decide I don't want to open any new file and just want to go back to what I was doing. What would be the standard way to do that? I can use to eventually land up where I was but I need to backtrack all the motion commands I did in the netrw buffer. I thought of using :q but that closes vim if only one window is open. Am I missing something obvious? You can try using CTRL-^ to jump to the alternate buffer. But for some reason, this doesn't work right after starting up Vim. It works after that. $ vim xyz.txt :e . If you press CTRL-^ now to jump to the alternate buffer, it says, "E23: No alternate file". But if you do the following, then it works. $ vim xyz.txt :e . :e xyz.txt Now, you can use CTRL-^ to jump between netrw buffer and xyz.txt file. This looks like a bug in netrw. - Yegappan
Re: gvim cut paste selection
On 11/4/06, Ujjal Bose <[EMAIL PROTECTED]> wrote: Hi , I was having problem with cut-paste selections from X <-> Windows for gvim (6.2) , and this is the reply I got from the RealVNC team . So is there a way to solve this in gvim ? -- Forwarded message -- From: James Weatherall <[EMAIL PROTECTED]> Date: Nov 3, 2006 9:59 PM Subject: RE: Xvnc cut paste problem To: Ujjal Bose <[EMAIL PROTECTED]>, [EMAIL PROTECTED] Hi Ujjal, It sounds like gvim doesn't set the timestamp on the X selection correctly when it sets it, so vncconfig doesn't think it's changed. Selecting text in another X application, then selecting the desired text in gvim should cause vncconfig to see the selection ownership change and to then send the gvim text to the viewer. Cheers, Wez @ RealVNC Ltd. The last time this issue was discussed, Bram blamed the problem on VNC. Namely that VNC doesn't handle value 0 as CurrntTime correctly. Still nobody made a patch to gvim to fill non-0 value into CurrentTime. See: 1. 2004-05-28 Re: Suggested addition to 'clipboard' for X windows vim-dev Bram Moolenaar 2. 2004-05-28 Re: Suggested addition to 'clipboard' for X windows vim-dev waggoner 3. 2004-05-19 Re: Suggested addition to 'clipboard' for X windows vim-dev Bram Moolenaar 4. 2004-05-19 Re: Suggested addition to 'clipboard' for X windows vim-dev Mark Waggoner 5. 2004-05-18 Re: Copy/cut/paste between unix vim under VNC and win vim-dev Bram Moolenaar 6. 2004-05-18 Re: Copy/cut/paste between unix vim under VNC and win vim-dev waggoner 7. 2004-05-17 Re: Copy/cut/paste between unix vim under VNC and win vim-dev Bram Moolenaar 8. 2004-05-17 Copy/cut/paste between unix vim under VNC and windows vim-dev waggoner 1. http://marc.theaimsgroup.com/?l=vim-dev&m=108575072405702&w=2 2. http://marc.theaimsgroup.com/?l=vim-dev&m=108572611818054&w=2 3. http://marc.theaimsgroup.com/?l=vim-dev&m=108496125926436&w=2 4. http://marc.theaimsgroup.com/?l=vim-dev&m=108495869813701&w=2 5. http://marc.theaimsgroup.com/?l=vim-dev&m=108487127321270&w=2 6. http://marc.theaimsgroup.com/?l=vim-dev&m=108484164403886&w=2 7. http://marc.theaimsgroup.com/?l=vim-dev&m=108482463303900&w=2 8. http://marc.theaimsgroup.com/?l=vim-dev&m=108481673228379&w=2 Yakov
Lapsus in usr_10.txt?
Fellow Vimmers, Lines 185-186 in usr_10.txt claim ... Other flags include p (print), which causes the ":substitute" command to print out each line it changes. ... This is not what happens. Line 639 in change.txt correctly describes the actual behaviour: [p] Print the line containing the last substitute. The text in usr_10.txt should be changed into something like: ... Other flags include p (print), which causes the ":substitute" command to print out the last line it changes. ... Cordially, Guido. -- http://vanhoecke.org ... and go2 places!
BufEnter Oddity After TabEnter
Hello Vim List, I am having a problem trying to echo a message triggered by an autocmd on BufEnter when entering a tab page. Try this: :au BufEnter foo echom "Entered foo" First lets try opening a window on the same tab page: :sp foo The message appears in the command line area as expected. Switching between windows, the messages is seen each time foo is entered. Wipe foo with: :bw foo Now try a tab page: :tabe foo The message appears as expected. However leaving and then entering the foo tab page does not display the message! Typing :mes shows that the message was indeed displayed. What is overwriting it? -- Best regards, Bill
Re: Getting out of netrw
* Yegappan Lakshmanan [2006.11.04 13:00]: > You can try using CTRL-^ to jump to the alternate buffer. Good idea. Most suggestions were useful, BTW, thanks all. > This looks like a bug in netrw. Well personally I find not having a "quit" or "exit" function pretty close to a bug. But there are so many ways around it I don't find it a very serious one... -- JR
Re: Getting out of netrw
On 2006-11-04, Yegappan Lakshmanan <[EMAIL PROTECTED]> wrote: > Hi, > > On 11/3/06, Jean-Rene David <[EMAIL PROTECTED]> wrote: > > Say I open vim7's new super duper file explorer > > "netrw" to browse some local directory. Say then I > > decide I don't want to open any new file and just > > want to go back to what I was doing. What would be > > the standard way to do that? > > > > I can use to eventually land up where I was > > but I need to backtrack all the motion commands I > > did in the netrw buffer. > > > > I thought of using :q but that closes vim if only > > one window is open. > > > > Am I missing something obvious? > > > > You can try using CTRL-^ to jump to the alternate buffer. > > But for some reason, this doesn't work right after starting > up Vim. It works after that. > >$ vim xyz.txt >:e . > > If you press CTRL-^ now to jump to the alternate buffer, > it says, "E23: No alternate file". But if you do the following, > then it works. > >$ vim xyz.txt >:e . >:e xyz.txt > > Now, you can use CTRL-^ to jump between netrw buffer > and xyz.txt file. > > This looks like a bug in netrw. Your first example works fine for me, whether xyz.txt exists or not. It may be that you have an old version of netrw. I'm using version 103g. Regards, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
Re: Getting out of netrw
Say I open vim7's new super duper file explorer "netrw" to browse some local directory. Say then I decide I don't want to open any new file and just want to go back to what I was doing. What would be the standard way to do that? On 2006-11-04, Jean-Rene David <[EMAIL PROTECTED]> wrote: > * Yegappan Lakshmanan [2006.11.04 13:00]: > > You can try using CTRL-^ to jump to the alternate buffer. > > Good idea. You can also use ":e#" to edit the alternate buffer. > Well personally I find not having a "quit" or > "exit" function pretty close to a bug. But there > are so many ways around it I don't find it a very > serious one... This is not a bug, nor close to a bug. Opening the file explorer in a buffer is no different fundamentally from opening a file in a buffer. The commands and behaviors are different from those you use when editing a file, but it's still just text in a buffer. When you open file A, then open file B, then want to go back to A, you don't do so by quitting B--you explicitly open A. Regards, Gary -- Gary Johnson | Agilent Technologies [EMAIL PROTECTED] | Wireless Division | Spokane, Washington, USA
Re: Getting out of netrw
Jean-Rene David wrote: * Yegappan Lakshmanan [2006.11.04 13:00]: You can try using CTRL-^ to jump to the alternate buffer. Good idea. Most suggestions were useful, BTW, thanks all. This looks like a bug in netrw. Well personally I find not having a "quit" or "exit" function pretty close to a bug. But there are so many ways around it I don't find it a very serious one... Vim's ":quit", ":close" or ":exit" commands will close any window, including "special" windows like the netrw, options, quickfix, ... windows. So where's the problem? Best regards, Tony.
Re: Getting out of netrw
On Sat 4-Nov-06 5:40pm -0600, A.J.Mechelynck wrote: > Vim's ":quit", ":close" or ":exit" commands will close any window, including > "special" windows like the netrw, options, quickfix, ... windows. So where's > the problem? Reading the thread, it appears the OP was editing a file and then started the explorer with something like ":edit ." - i.e. he was in a single window. In that case, :quit or :exit would close down Gvim - not what he wanted. :close would generate an error message. Perhaps simply :bd is more like what he wants? -- Best regards, Bill
Re: Getting out of netrw
Bill McCarthy wrote: On Sat 4-Nov-06 5:40pm -0600, A.J.Mechelynck wrote: Vim's ":quit", ":close" or ":exit" commands will close any window, including "special" windows like the netrw, options, quickfix, ... windows. So where's the problem? Reading the thread, it appears the OP was editing a file and then started the explorer with something like ":edit ." - i.e. he was in a single window. In that case, :quit or :exit would close down Gvim - not what he wanted. :close would generate an error message. Perhaps simply :bd is more like what he wants? Well, let him learn split-window commands then: ":new ." opens the explorer in a separate window; or, if you want a File-Explorer-like display on the side, ":topleft vsplit ."; later, ":q" will close that extra window. Best regards, Tony.
Re: Getting out of netrw
On Sat 4-Nov-06 6:10pm -0600, A.J.Mechelynck wrote: > Bill McCarthy wrote: >> On Sat 4-Nov-06 5:40pm -0600, A.J.Mechelynck wrote: >> >>> Vim's ":quit", ":close" or ":exit" commands will close any window, including >>> "special" windows like the netrw, options, quickfix, ... windows. So where's >>> the problem? >> >> Reading the thread, it appears the OP was editing a file and >> then started the explorer with something like ":edit ." - >> i.e. he was in a single window. >> >> In that case, :quit or :exit would close down Gvim - not >> what he wanted. :close would generate an error message. >> >> Perhaps simply :bd is more like what he wants? >> > > Well, let him learn split-window commands then: ":new ." opens the explorer in > a separate window; or, if you want a File-Explorer-like display on the side, > ":topleft vsplit ."; later, ":q" will close that extra window. Good point. And if wants to work in a full window, then ":tabe ." will do that and still close down with ":q". -- Best regards, Bill
Re: Getting out of netrw
* Gary Johnson [2006.11.04 18:30]: > When you open file A, then open file B, then > want to go back to A, you don't do so by > quitting B--you explicitly open A. Looking at it that way, it makes good sense. Thanks again for all the suggestions. -- JR
Re: noimd don't works under linux
I tried this on FC2: :set stl=%{&imd} :inoremap :set imd :nnoremap i :set noimdi The first line (along with my usual :set laststatus=2) means that I can check my 'imd' setting in the status line. When I go between Normal and Insert modes with i and , it changes from 1 to 0 and back, so I think it is working. Yes, I get the same result. Please try this and see whether you get anything different. Also, try it with $ vim -u NONE :set nocp If you get the same results but are still having trouble, then the problem might be some other setting. HTH --Benji Fisher When starting with "-u NONE", status line isn't showed. Is there anything else I can do to locate the problem? Thanks Eddy
Re: noimd don't works under linux
Eddy Zhao wrote: I tried this on FC2: :set stl=%{&imd} :inoremap :set imd :nnoremap i :set noimdi The first line (along with my usual :set laststatus=2) means that I can check my 'imd' setting in the status line. When I go between Normal and Insert modes with i and , it changes from 1 to 0 and back, so I think it is working. Yes, I get the same result. Please try this and see whether you get anything different. Also, try it with $ vim -u NONE :set nocp If you get the same results but are still having trouble, then the problem might be some other setting. HTH --Benji Fisher When starting with "-u NONE", status line isn't showed. Is there anything else I can do to locate the problem? Thanks Eddy Enter ":set stl=%{&imd} ls=2" after starting Vim, and the status line will be shown, with 0 ('noimdisable') or 1 ('imdisable') on it. Best regards, Tony.
Re: noimd don't works under linux
2006/11/5, A.J.Mechelynck <[EMAIL PROTECTED]>: Eddy Zhao wrote: >> >> I tried this on FC2: >> >> :set stl=%{&imd} >> :inoremap :set imd >> :nnoremap i :set noimdi >> >> The first line (along with my usual :set laststatus=2) means that I can >> check my 'imd' setting in the status line. When I go between Normal and >> Insert modes with i and , it changes from 1 to 0 and back, so I >> think it is working. >> > > Yes, I get the same result. > >> Please try this and see whether you get anything different. Also, >> try it with >> >> $ vim -u NONE >> :set nocp >> >> If you get the same results but are still having trouble, then the >> problem might be some other setting. >> >> HTH --Benji Fisher >> > > When starting with "-u NONE", status line isn't showed. > Is there anything else I can do to locate the problem? > > Thanks > Eddy > Enter ":set stl=%{&imd} ls=2" after starting Vim, and the status line will be shown, with 0 ('noimdisable') or 1 ('imdisable') on it. Thanks (I forget to set ls). I do the following - gvim -u NONE - :set stl=%{&imd} ls=2 - :inoremap :set imd - :nnoremap i :set noimdi - :set nocp - switching back & forth between normal mode & insert mode using "ESC" & "i" When I pressing "i", the input focus is on command line & command line shows ":set noimdi". If I using ":nnoremap i :set noimdi", pressing "i" get me to insert mode (with an extra newline). But switching back & forth between normal mode & insert mode, status line always shows "0" BTW, I discover that in vim (not gvim), even start without "-u NONE", statusline always shows "0" (while gvim statusline will switch between "0" & "1") Anything I can do to further nail down the problem? Thanks Eddy
New vimscript distribution idea/ first beta implementation tell my your opinion
I've posted some time ago about this ideas: seperate user interface (mappings autocommands ..) from script code. Unify efforts (thus make it easier to existing code) .. I did call my attempt vimlib. It can be used here: http://mawercer.de/marcweber/vim/vimlib/ You can try out the installer files how it might look like to install different scripts. If you want add another runtimepath to be sure to not modify your existing vim configuration (1) goto docs -> index_file.html to get some overview of all files. Especially I recommend reading: vl_create_docs.vim ( how the documentation has been created automatically from .vim source file comments) scriptsettings.vim ( how to save / load user settings ) vimlib.vim ( more about this idea.) vim_vimlib.vim ( how a user interface can be distributed ) taghelper.vim ( define tag profiles and add tag/ create tag files really easily ) vimfile.vim ( vim autoload function prefix correction / function completion ) scan_and_cache_file.vim ( calls a scanning func to extract some information which is cached in mem or additionally in a file. see vimfile.vim for examples) multifile_distribution.vim/ create_installer.vim / create_installer_examples ( creates the installer) Its even posseble to browse documentation, copy some example code and run "DownloadEverythingNeededFor " to get all dependencies automatically after installing the base files using the installer. Some things might be broken and much isn't implemented yet.. Currently darcs is used as version control system. If you want to get everything use darcs get http://mawercer.de/marcweber/vim/vimlib/repository/ Then its easy to create and send patches. But last but not least I need your comments. Do you think it would be useful to put more efforts into developing this? Greetings Marc (1) just enter eg /home/you/vimlib_test as runtimepath to save to add set runtimepath+=~/vimlib_test to your .vimrc After finishing testing you can remove the directory and nothing will be left except of ~/.vim/permanent_memory ( used to cache file scan results) and ~/.vim/scriptsettings ( used to save script settings )
Re: noimd don't works under linux
Eddy Zhao wrote: 2006/11/5, A.J.Mechelynck <[EMAIL PROTECTED]>: Eddy Zhao wrote: >> >> I tried this on FC2: >> >> :set stl=%{&imd} >> :inoremap :set imd >> :nnoremap i :set noimdi >> >> The first line (along with my usual :set laststatus=2) means that I can >> check my 'imd' setting in the status line. When I go between Normal and >> Insert modes with i and , it changes from 1 to 0 and back, so I >> think it is working. >> > > Yes, I get the same result. > >> Please try this and see whether you get anything different. Also, >> try it with >> >> $ vim -u NONE >> :set nocp >> >> If you get the same results but are still having trouble, then the >> problem might be some other setting. >> >> HTH --Benji Fisher >> > > When starting with "-u NONE", status line isn't showed. > Is there anything else I can do to locate the problem? > > Thanks > Eddy > Enter ":set stl=%{&imd} ls=2" after starting Vim, and the status line will be shown, with 0 ('noimdisable') or 1 ('imdisable') on it. Thanks (I forget to set ls). I do the following - gvim -u NONE - :set stl=%{&imd} ls=2 - :inoremap :set imd - :nnoremap i :set noimdi - :set nocp - switching back & forth between normal mode & insert mode using "ESC" & "i" When I pressing "i", the input focus is on command line & command line shows ":set noimdi". If I using ":nnoremap i :set noimdi", pressing "i" get me to insert mode (with an extra newline). But switching back & forth between normal mode & insert mode, status line always shows "0" BTW, I discover that in vim (not gvim), even start without "-u NONE", statusline always shows "0" (while gvim statusline will switch between "0" & "1") Anything I can do to further nail down the problem? Thanks Eddy - Is your console Vim compiled with IM support? (I suppose it is, but check the ":version" output for +xim or +multi_byte_ime). Note: On Unix-like systems, IM support may require X11 support, and IM functionality may require access to an X server (thus, maybe in xterm displaying through X, not in /dev/tty which has no access to X). - Does it make any difference if you start Console Vim in 'nocompatible' mode, e.g. vim -u NONE -i NONE -N "+set stl=%{&imd} ls=2" ? Best regards, Tony.
Re: noimd don't works under linux
2006/11/5, A.J.Mechelynck <[EMAIL PROTECTED]>: Eddy Zhao wrote: > 2006/11/5, A.J.Mechelynck <[EMAIL PROTECTED]>: >> Eddy Zhao wrote: >> >> >> >> I tried this on FC2: >> >> >> >> :set stl=%{&imd} >> >> :inoremap :set imd >> >> :nnoremap i :set noimdi >> >> >> >> The first line (along with my usual :set laststatus=2) means that I >> can >> >> check my 'imd' setting in the status line. When I go between >> Normal and >> >> Insert modes with i and , it changes from 1 to 0 and back, so I >> >> think it is working. >> >> >> > >> > Yes, I get the same result. >> > >> >> Please try this and see whether you get anything different. >> Also, >> >> try it with >> >> >> >> $ vim -u NONE >> >> :set nocp >> >> >> >> If you get the same results but are still having trouble, then the >> >> problem might be some other setting. >> >> >> >> HTH --Benji Fisher >> >> >> > >> > When starting with "-u NONE", status line isn't showed. >> > Is there anything else I can do to locate the problem? >> > >> > Thanks >> > Eddy >> > >> >> Enter ":set stl=%{&imd} ls=2" after starting Vim, and the status line >> will be >> shown, with 0 ('noimdisable') or 1 ('imdisable') on it. >> >> > > Thanks (I forget to set ls). > > I do the following > - gvim -u NONE > - :set stl=%{&imd} ls=2 > - :inoremap :set imd > - :nnoremap i :set noimdi > - :set nocp > - switching back & forth between normal mode & insert mode using "ESC" & > "i" > > When I pressing "i", the input focus is on command line & command line > shows ":set noimdi". > > If I using ":nnoremap i :set noimdi", pressing "i" get me to > insert mode (with an extra newline). But switching back & forth between > normal mode & insert mode, status line always shows "0" > > BTW, I discover that in vim (not gvim), even start without "-u NONE", > statusline always shows "0" (while gvim statusline will switch between > "0" & "1") > > Anything I can do to further nail down the problem? > > Thanks > Eddy > - Is your console Vim compiled with IM support? (I suppose it is, but check the ":version" output for +xim or +multi_byte_ime). Note: On Unix-like systems, IM support may require X11 support, and IM functionality may require access to an X server (thus, maybe in xterm displaying through X, not in /dev/tty which has no access to X). - Does it make any difference if you start Console Vim in 'nocompatible' mode, e.g. vim -u NONE -i NONE -N "+set stl=%{&imd} ls=2" ? Hi Tony, I only using IM in gvim. So I only want IM work correctly in gvim. gvim is with +xim support. Thanks Eddy