Latex-suite: disable smart key mappings (e.g. ... - \ldots)

I've recently started using LaTeX. Since vim/Gvim is my absolutely favorite text editor, it's plugin latex-suite comes in handy with features such as text folding. Latex-suite also has some auto-completion/conversion features; unfortunately I don't like them. The most annoying are conversions such as ... -> \ldots. While this may be useful when using ... inside a text, it definitely isn't when trying to format the LaTeX document with ............. lines because they are automatically converted to \ldots\ldots\ldots!!!
I've already found out that this feature is called "Smart Dots" (see http://vim-latex.sourceforge.net/docume … suite.html --> "3.9. Smart Key Mappings"). Here http://vim-latex.sourceforge.net/docume … -keys.html it is described how to disable some of the smart key mappings; unfortunately, not the Smart Dots.
Any idea how to disable Smart Dots or even all auto-completion/conversion features in general? I generally don't like auto-completion/conversion!

It turns out this isn't QUITE as simple as I thought.  Since some latex elements are closed (eg \begin{something} ... \end{same something}) while others are not (eg \chapter \section) the folding function needs to check for each.
First here is my generic folder
function ToggleFold(marker)
if foldlevel('.') == 0
normal 0
call search(a:marker,'c')
let x = line('.')
normal %
let y = line('.')
execute x . "," . y . " fold"
else
if a:marker == '<'
normal k
let x = line('.')
normal j
normal zd
execute x
normal j
else
normal zd
normal %
endif
endif
endfunction
"some example bindings
nmap <space> ;call ToggleFold("{")<CR>
" } This is just here to match/close the previous line
au BufNewFile,BufRead *.svg set filetype=xml
au FileType html,xml nmap <space> ;call ToggleFold("<")<CR>
au FileType html,xml let b:match_words = '<\([^ >]*\)[^>]*>:</\1>'
And the whitespace or python-like code folder
function ToggleIndentFold()
if foldlevel('.') == 0
let x = line('.')
let i = indent('.')
normal j
while indent('.') > i
normal j
endwhile
normal k
let y = line('.')
execute x . "," . y . " fold"
else
normal zd
endif
endfunction
"" The above function may hang in the while loop if
"" the file does not have a trailing empty line.
"" The following function checks for and/or adds one.
function StartOutline()
let x = line('.')
normal G
if indent('.') != 0
normal o
execute x
endif
endfunction
The challenge is parts of each of these would be needed for "complete" latex folding.  The begin/end bounded blocks can use the generic function with these line
au BufNewFile,BufRead *.tex nmap <space> ;call ToggleFold("\begin")<CR>
au BufNewFile,BufRead *.tex let b:match_words = 'begin{\([a-z]*\)}:end{\1}'
but this will not fold "unbounded" blocks like chapter section and item.
Here is my first attempt at a general purpose latex folder.  It works ... most of the time.
function ToggleLatexFold()
if foldlevel('.') == 0
let block_type = matchstr(getline('.'),'\(chapter\|section\|item\)')
if block_type != ""
" I don't like the next four lines - there should be a better way of
" getting the number of lines in the buffer
normal ma
normal G
let last_line = line('.')
normal `a
" end ugliness
let x = line('.')
normal j
while matchstr(getline('.'),block_type) != block_type
if line('.') >= last_line
break
endif
normal j
endwhile
normal k
let y = line('.')
execute x . "," . y . " fold"
else
normal 0
call search("\begin{",'c')
let x = line('.')
normal %
let y = line('.')
execute x . "," . y . " fold"
endif
else
normal zd
normal %
endif
endfunction
au BufNewFile,BufRead *.tex nmap <space> ;call ToggleLatexFold()<CR>
au BufNewFile,BufRead *.tex let b:match_words = 'begin{\([a-z]*\)}:end{\1}'
It fails, however, when a section is followed a new chapter rather than another section.  This part would be easy to fix.  It also fails, though, when a same-flavor block is nested within the current - for example a \item that has a nested enumerate or itemize will not fold properly.
For my use, I'll stick with putting braces in comments around my major elements.  But hopefuly this will give you some ideas.  If you make any big improvements, let me know.
No doubt I have really just reinvented the wheel - but thats the best way to really know how wheels work!

Similar Messages

  • Smart Key

    I broke my smart key.. is there anyway to get pass the security check now???

    Me too,
             I have my key but when I put in in and set the password all I get on the screen is a message that says it is updating my config files. This has been updating now for over 24 hrs. I can't disable it or move into anything. I now am the proud owner of the DUD type of motherboard.
    Looks like a $ 150 down the drain. MSI tech support gives no response.
    I guess I won't be buying an MSI m/b again.

  • Disabling Smart Quotes in FrameMaker 7.2

    Hi,
    My team uses FrameMaker 7.2 to create and edit DITA XML files. We recently noticed that the smart quote feature inserts non-printable characters in our XML content files. Our help system cannot display the characters properly, and so we've started to search for and replace the smart quote characters with straight quotes (outside of FrameMaker).
    The smart quote characters seem to be defined in the maker.ini file.
    ; Smart Quote Characters
    ; SmartQuotes \xd4\xd5\xd2\xd3 )  English curved quotes
    ; SmartQuotes \xe2\xd4\xe3\xd2 )  German-style quotes with base quotes
    ; SmartQuotes \xd5\xd5\xc7\xc8 )  French-style quotes using guillemets
    ; SmartQuotes \xd5\xd5\xd3\xd3 )  Swedish- and Finnish-style quotes
    ; SmartQuotes \xd4\xd5\xd2\xd3 )  Italian curved quotes
    ; English curved quotes:
    SmartQuotes=\xd4\xd5\xd2\xd3
    I've been searching unsuccessfully online for hex code characters to replace the smart quote characters with straight quotes. Does anyone here know which character codes to use?
    Incidentally, I've fiddled with the feature for disabling smart quotes per document (Format > Document > Text Options), but don't want my team mates to have to perform this task every time they open a file.
    Thanks,
    Mark

    Mark,
    the Text Options are stored with the FrameMAker file and since you are opening XML files the setting must be made once in the template used when opening XML files.
    As far as I know FrameMaker writes curly quotes as perfectly valid codepoints to XML, so it must be a weakness of your help system not being able to display those characters. There is nothing wrong with those characters. Have you found the problem there?
    - Michael

  • Can you clone Remote System key mappings?

    We have 2 Remote Systems set up for our MDM repository with key mappings for 60 tables. I now need to add an additional Remote System which is similar to one of the existing ones, but with a few different values. Is there any way I can clone the existing one or do I have to go through all 60 tables one by one, export the info, edit it to show the new Remote System name and re-import it? I have searched the sources but can't find anything on this precise topic.
    Thanks for any help you can give.
    Peter Croft

    Peter,
    No you cannot.
    Prepare a source having Just two columns ex., new Remote Keys of the system and an common identifier field in the table which you are planning to import with the data. Import it and get it to the data manager as records with just two fields(Remote Key and Common identifier). If you have the import maps already stored for the tables when you have done for the previous imports for the other two remote systems, use them and  automate the importing process for this particular remote system (via port configuration in console and Data manager) for the remaining fields of the table.

  • How can I disable a key through software?

    A friend of mine spilt water on her keyboard. As a result, her forward slash key frequently spams and makes typing difficult. I used a program to remap the forward slash key to a forward delete key, but that has also caused problems. What I'm looking for is a program that will allow me to completely disable a key.
    I should note, I've used KeyRemap4Macbook and I've also developed my own code, which disables the key on Cocoa applications. However, the key still spams on applications like Microsoft Word.
    Her Macbook is more than a year old, and she can't afford to buy a new one.
    Any suggestions?

    Liquid in a physical keyboard is great trouble. You may worsen state if you continue to use it like this, make the effort to change it. It is not cheap, but may prove cheaper than damage the whole computer.

  • Reading Forms Key Mappings from java bean - how ?

    I want to be able to invoke key trigger code in a Forms 10g run-time from a java bean (extends BeanWrapper) either by:
    a) using inherited method calls passing the KeyEvent retrieved from my listener, or
    b) dispatching a custom event from the bean with a parameter value which identifies the key trigger to process (not the key code & modifier string).
    On a), I've not been able to identify any method in the BeanWrapper hierarchy tree that might help me do this, and samples like (http://forms.pjc.bean.over-blog.com/categorie-465294.html) seem to imply that no such method exists.
    In terms of b), the oracle.forms.engine.KeyMapTable class seems to be what I want (seems to translate the KeyEvent into a FormAction/string using server settings), but getting a hold of this object through (oracle.forms.engine.Main)getHandler().getApplet() doesn't seem possible.
    How are others invoking eg: key-crerec from a Forms 10g bean component in a way which is sensitive to server key mappings ?
    Thanks in advance for your help.

    I have no experience with KeyEvents in Forms, but if the KeyMapTable class really is the solution, can't you just instantiate one yourself.
    Looking at the constructor it only needs a single argument, the oracle.forms.engine.Runform class. You should be able to get a handle on it with:
    IHandler hander = getHandler();
    if (handler instanceof UICommon) {
        UICommon u = (UICommon)handler;
        // u.getDispatcher() should get oracle.forms.engine.Runform
    }Not sure if it will work, but you can give it a try.
    I love pushing the PJC and Oracle Forms applet to its limits. Not really sure if Oracle intended the PJC framework to do stuff like this, but it sure would have helped if they have JavaDoc about the oracle.forms.* classes

  • Edit [Key Mappings] in ItemDetails iView

    Hello, all!
    I'm new to portal content development.
    I successfully created MDM ResultSet iView and MDM ItemDetails iView and I can see all fields that I need.
    The problem is I can't edit Key Mappings for the raw chosen (but I can see the values).
    Is this problem with my configuration?
    Many thanks in advance
    Renat
    Edited by: renat shaihetdinov on Feb 5, 2009 5:46 PM

    Hello, Namrata.
    Thank You for reply.
    I've already set "Enable Edit" option for the IView to true.
    Also I've set the "Updatable" property for Key mapping field to true.
    I can edit any other fields of IView, but cannot edit Key mapping field.
    Renat
    Edited by: renat sha on Feb 11, 2009 7:41 AM

  • Disable Function Key F3 in Internet Explorer

    I would like to disable function keys F1 and F3 while playing
    my flash movie in internet explorer. I am using these keys within
    Flash to do some actions.
    I got the script working for Function Key F1 using the
    following script
    <script language="javascript">
    document.onhelp = function() {return(false);}
    window.onhelp = function() {return(false);}
    </script>
    But unable to make it to work for function key F3.
    Thanks in advance,
    Desmond

    Hi des_shun, I have workaround for this issue.
    First thing we have to do is disable keyboard event for F3 key on HTML document so that even if focus is on html document, default Search functionality will not popup. Next thing is, flash must contain KeyboardEvent listener for keyboard response. This is where we will keep our custom F3 functionality. This setting works well on Chrome & FireFox.
    Now IE thing.
    The prolem with IE is that if any one of F3, F5, F6,F7 & F11 key is pressed, when the focus is on flash movie it directly executes the default browser functions like searching, refreshing etc never allowing flash to execute its keyeventlistener. But if focus is on document body, then F3 and other keys work fine.
    Here is the catch.
    All we have to do is whenever focus is shifted to flash, we should revert that focus to document body.
    Here is how we can do this.
    Capture the MouseClick event in your flash movie. Then in this mouseclick event handler, call  javascript function to change focus to document again. Below is the sample code.
    //Flash Code
    stage.addEventListener(MouseEvent.CLICK,mClick);
    function mClick(event:MouseEvent)
              ExternalInterface.call("changeFocus");
    // Javascript Code
    <script type="text/javascript"</script>
              function changeFocus()
                             document.body.focus();
        </script>
    Thats it!

  • Anyway to disable Smart Dialing and add Edit before dial in phone dialer

    Is there any way to disable Smart Dialing in OS 10.2, my old BB with OS 7 can set the country code to "null"
    The feature is annoying as in Greater China, we have have 1 sim card with 4 nnumber for HK, China, Taiwan and Macau all with different country code.  The smart dialer alway add the country code to the phone number and call dial unsucessful.   
    Also in old OS 7 it allow edit before dial, but in OS10.2 I can never edit a phone number after paste in phone dialer, since here we always need to change country code, area code, add a "+" etc 

     I would suggest what you mentioned as blackberry can support multiple numbers in one contact, so you would only have one contact for say John Smith... but a contact for in country and out of country. Aside from that, I dont believe there has been an app developed for this specific issue.
    1). Please thank those who help you by clicking the beside the 'Reply' button.
    2). If your issue has been solved, please resolve it by marking "Accept as Solution" on the correct post!
    3). Remember to have fun! We are all in this together!
    4). Follow me on

  • Key mappings

    Hello All
    I have merged two identical data. and when I click right to edit the key mappings I didn´t see any information about the keys mappings of those two records  that I have merged .
    To edit key mappings of two records . How can I do it ?
    When I defined the tables . I have defined "Yes" in Keymapping details .
    =======================================================
    I edited an xml file with two duplicated data . I have imported the data in my repository and now with data manager i´am trying to merge those two data . I want to edit the key mapping but i didn´t see any key mapping .
    Any answer about the situation ?
    Thanks

    Hi Stan,
    I assume that you imported the ID of the records into a plain field in your repository. But you have to pick [Remote Key] as the destination in the Import Manager mapping (if you need both, clone the field).
    This way, you'll get an entry in the key mapping for the chosen client system with the record ID. If you merge now, you will have two entries in the Key Mapping.
    For the [Remote Key] field to appear, your client system has to be inbound/outbound.
    Hope this helps,
    Christiane

  • How do I get the last Java back, the most recent upgrade has disabled a key task my computer needs to be able to use for my business?

    I recently allowed the software update and the installation of java 7 has disabled a key task I need for my business, specifically being able to view 360 degree tours that I create. 

    Slightly different OS and update, but I was able to use Pacifist to install the java Update 15 for mac os 10.6 after Update 16 had screwed up some business-critical sw of ours.  You will need to go to the downloads site and download the previous update, and then use Pacifist to re-install the earlier version.
    http://stackoverflow.com/questions/6411909/how-to-downgrade-jre-jdk-on-mac-osx
    This might or might not actually work -- it depends entirely upon the details of the updates, and you could end up in some weird jumble of pieces-of-multiple-updates all together...  Java updates are patches, not a full copy of the software, so to really go back you have to start from the beginning and apply the updates in order.  In the case of Update 16, we were lucky in that whatever was screwing up our program was changed in both Update 15 and Update 16, so writing the Update 15 back overtop of 16 fixed our problem.

  • How to disable certain keys in Macbook's keyboard

    How to disable certain keys in Macbook's keyboard? My keyboard is break down. It always type "\" key and disturb me!
    Dealer says internal keyboard need cost $120 to replace.
    So, I think can i disable "\" key? i don't want to disable keyboard, just \" key.
    Thanks for help!

    This posting shows how to remove a default Action;
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=657819

  • How to disable F1 Key in Safari?

    How to disable F1 Key in Safari?
    (from my website)

    Have a look at Safari>Preferences>Privacy.
    (The next category over from the one you displayed in your picture.)
    charlie

  • Latex-suite no longer working

    I don't know exactly when this happened, but latex-suite doesn't work anymore since one of the latests Vim upgrades. Is anybody else experiencing this problem?
    I checked in AUR and it seems to be a general issue. Does anybody knows how to fix it?

    cmlr wrote:
    Before latex-suite, there was auctex.vim, which has many of the same features.  It still works;  I'm the author, I'm happy to consider any suggestions.  Give it a try.
    http://www.vim.org/scripts/script.php?script_id=162
    Carl
    Thanks a lot, man! I'll give it a try as soon as I get home.

  • Vim LaTeX-suite compile

    I have the latex-suite in vim and I use it to compile.  However, by default it compiles to DVI.  I would like for it to compile to PDF by default instead.  As of right now, if I try setting it to PDF (for example, using :TTarget pdf), it does not carry over from session to session.  Is there a way to make it set on startup (mabye via the .vimrc)?
    If not, how does one get the present directory of the file currently being editted?  For example, :!cd DIRECTORY ; pdflatex FILE.tex , works when typed in manually.  How about if one wanted to create a keybinding in .vimrc to yield this?
    Thanks,
    zeug.

    zeug wrote:
    I do not seem to have that directory.  I did find that file a bunch of locations, though.  Any idea which one should be editted?
    (…LOCATIONS!…)
    Thanks.
    Uhh, I'm never able to recall which directory gets overwritten on each vim update, sorry There was a thread about this once, but I can't seem to find it just now…
    The manual explains the options very well, I think, but it still doesn't say where this stuff should belong. However, unless you intend to write your documents as root, I'd say just create the ~/.vim/ftplugin folder and put tex.vim in it.
    makimaki wrote:Thanks for that tip
    Yer welcome.
    Edit: Found the aforementioned thread.
    Last edited by Runiq (2010-02-23 22:49:26)

Maybe you are looking for