76 Commits

Author SHA1 Message Date
Gerd Wachsmuth b1872abd4f Merge pull request #51 from vim-latex/improved_folding
Improved folding feature
2016-09-21 22:04:49 +02:00
Gerd Wachsmuth ee2822394c Fix issue in LookupCharacter
In insert mode, <c-v>O will let you insert ascii keycodes as octal
numbers. Hence, an 'O' must not be preceeded by <c-v>. However, <c-v> is
necessary, if a:char is <c-\>.

Fix #59
2016-07-24 12:20:13 +02:00
Yuchen Ding c7aa5fa063 Fix issue in LookupCharacter
If a:char is a special character (e.g., <c-\>), it could interact with the following <c-g>.
Solution: Insert a:char literally.
2016-06-11 23:10:07 +02:00
Gerd Wachsmuth 275a85bf21 Improved the folding feature
- Improved(?) the foldtext
- Itemize environments can nest
- Replaced a stack implementation by vim lists
- Add some debugging code to SyntaxFolds.vim
- Removed some bugs
- Speedup of folding
2016-05-14 20:33:04 +02:00
Gerd Wachsmuth 79f0f795be Removed obsolete libList
Only one function from this lib was used, and
this has been moved (and slightly modified) to main.vim
2016-05-07 21:41:22 +02:00
Gerd Wachsmuth 5ab742d548 Fix bug with :iab
See http://vi.stackexchange.com/questions/2245/strange-behaviour-of-abbreviations-triggered-with-shiftenter-in-gvimvim-latex.
2016-04-25 22:55:36 +02:00
Gerd Wachsmuth 63b02f05ce New option: g:Imap_GoToSelectMode
This can be used to fix #47.
2016-04-25 22:50:59 +02:00
Gerd Wachsmuth fa6192981e Do not turn on highlighting in IMAP_Jumpfunc.
IMAP_Jumpfunc does not use the search prompt anymore. Thus, it will not have any effect on search highlighting.
2016-04-25 22:50:58 +02:00
Daeyun Shin 392577fc20 Fix: allow function overloading - Add the missing function qualifier (!) to indicate that MultiByteStrpart and MultiByteStrlen can be safely overloaded. See https://github.com/vim-latex/vim-latex/issues/5 2014-11-23 10:36:47 +01:00
LuX 02cce04263 imaps.vim: Add multibyte LHS support
- Add s:MultiByteStrlen() and s:MultiByteStrpart()
- Allow for example IMAP chaining as follows:
call IMAP("\\subset", "⊂", "")
call IMAP("⊂eq", "⊆", "")

References:
https://sourceforge.net/p/vim-latex/patches/5/
2014-11-15 19:08:36 +01:00
TODA Shuta 0ced0c9571 Fix some mappings to avoid unexpected recursive expansion. 2014-11-15 17:31:14 +01:00
Till Maas 3e7695b366 Restore registers with setreg()
Do not use "let @a = _a" to restore registers, since this adds an extra line
feed character to the register.

References:
- http://stackoverflow.com/questions/26896399/why-does-let-modify-the-value-it-assigns
- https://bugzilla.redhat.com/show_bug.cgi?id=1163518

Patch idea by Daniel Wagner <me@dmwit.com>
2014-11-15 16:34:02 +01:00
Till Maas dd2e3daf1e remove remaining SVN/CVS keywords 2014-11-15 15:23:57 +01:00
Michael Ekstrand 1a10ee7cc9 Use noremap for IMAP mappings
The IMAP mappings used plain [inv]map instead of the noremap
versions.  This causes conflicts with other plugins.
2014-05-12 13:31:03 -05:00
Bodo Graumann ce16347c36 Allow to undo IMAP substitution 2012-11-01 00:19:38 +01:00
Philipp Hartwig 8d8d1f4423 imaps: make VEnclose work when ignorecase is set 2011-02-14 20:57:42 +01:00
Till Maas e2f07b8792 remove most svn/CVS keywords 2010-11-12 22:12:38 +01:00
Johann Felix Soden 77c5977468 redefine RemoteOpen, RemoteInsert, if they exist
Description: Fix error message on double loading
 If the file plugin/remoteOpen.vim is loaded twice by vim (e.g. at both local
 and system-wide installation), errors about redefined commands are shown.
 This patch should fix this.
Author: Johann Felix Soden <johfel@gmx.de>
Bug-Debian: http://bugs.debian.org/444426
2010-11-12 22:10:59 +01:00
Srinath Avadhanula ffa9b5e465 Bug: In Vim6, there is an error on startup.
Why: Apparently, you cannot use
     :if v:version >= 700
        :for something
            ...
        :endfor
     :endif
     the :endfor and :for trigger errors.
Fix: For now, just remove this code from latex-suite since there is a new
     release purely for vim7 coming up.
2006-04-17 23:50:10 +00:00
Srinath Avadhanula cd184726e7 New: Significant speedup for the FB_DisplayFiles() function. Instead of
using FB_Strntok() to get the i^th line of glob('*'), iterate using
     stridx(). This makes the time required by FB_OpenFileBrowser() to list
     the files in C:/WINDOWS/system32 reduce from 104 seconds to 1 second.
     If v:version >= 700, then we can directly use Vim's inbuilt list and
     split() functions. This makes the time go to 0.6 seconds.
2006-03-28 19:15:18 +00:00
Srinath Avadhanula 059382b7db New: Used one of the advantages of using svn. Liberally used the 'prop*'
commands to do the following:
     1. change the EOL style of all vim files to be just LF.
     2. changed the mime-type of all files to text/plain
     3. removed the executable flag on all files.
     This should hopefully make the repo look better on all platforms etc.
2006-03-20 09:45:45 +00:00
Srinath Avadhanula 048e26a104 Bug: Sourcing problems because line continuation was used here.
Fix: Adjust 'cpo' settings at the start of the script.
2006-03-20 08:35:08 +00:00
Srinath Avadhanula b37e596f37 New: A new command :RemoteInsert which is useful for integration with
Jabref.
2006-03-20 08:30:51 +00:00
Srinath Avadhanula 3fff75c2a2 Bug: If there is an abbreviation like this:
:iab zzz whatever
     then typing 'z<space>' triggers the abbreviation in the presence of
     latex-suite. (Cristian Rigamonti)
Why: The reg-exp used to find out if a iab existed was faulty.
Fix: Fix the regexp to use an exact match of the previous word.
2006-03-19 04:29:47 +00:00
Srinath Avadhanula f1eb335c8e Minor clarification of code. 2005-12-28 00:38:04 +00:00
Srinath Avadhanula 2de1a71275 Bug: Typing
>>> \begin{array}
     >>>    \end{}
     results in
     >>> \begin{array}
     >>> \end{<++>}
     with the cursor at the end (Berta Milan)
Why: When the indentation of a line changes while typing the text returned
     by IMAP_PutTextWithMovement, then IMAP_Mark('go') does not go to the
     same location as set by IMAP_Mark('set'). This causes the cursor to be
     located not before the first placeholder causing the first
     placeholder to be "missed".
Fix: Check to see if the indentation of the line remembered by
     IMAP_Mark('set') has changed and if so, move a little to the left or
     right to adjust for the indentation changing.
2004-05-30 07:35:40 +00:00
Srinath Avadhanula 88d15e913d Bug: when 'ignorecase' is set, then typing 'etB' triggers an error.
Why: With 'ignorecase' set, 'etB' matches 'ETB', therefore, LookupCharacter
     assumes that a map exists for 'etB' and tries to find the value of
     s:Map_Tex_etB which doesn't exist.
Fix: Force matching case with the \C pattern.
2004-05-04 20:50:11 +00:00
Srinath Avadhanula dceabf2b35 Bug: RemoteOpen does not work with file names with spaces.
Why: The following vim command
        :drop File Name with spaces
     opens up multiple files.
Fix: escape() the file name before issuing the drop command.
     NOTE: There is a vim bug where
        exec "drop ".escape(filename, '\ ')
     hangs GVIM.
2004-03-14 19:39:29 +00:00
Srinath Avadhanula c1ee594281 Bug: Opening a file via the :RemoteOpen command does not work (Xin Yin)
Why: Vim eats up all but the last remote_send call when multiple
     invokations to this function are made (Vim bug)
Fix: Collapse the entire set of keys into a single string and make a single
     remote_send call.
2004-02-29 07:26:22 +00:00
Srinath Avadhanula 8911aa61ca Meta-bug! A bug in the debugging function. 2003-12-04 00:06:06 +00:00
Srinath Avadhanula 7401953921 Bug: When &enc==utf8 and g:Imap_PlaceHolder* settings are not lower-ascii,
then we would get an error when we used any of the IMAP functions!
Why: A silly little bug. An extra quote
2003-11-26 05:45:46 +00:00
Srinath Avadhanula 86fb6cddeb New: the g:Imap_FreezeImap function temporarily pauses any macro expansion. 2003-11-14 10:37:56 +00:00
Srinath Avadhanula 6411382543 Bug: Sometimes a Tex_LastSearchPattern not found error is generated (Eugene
Minkovskii)
2003-11-13 08:53:43 +00:00
Srinath Avadhanula 7d2bd15843 Bug: @/ would sometimes change from its previous value when using
IMAP_Jumpfunc().
Why: s:RemoveLastHistoryItem sets @/ to the last search item in the @/
     history, but @/ is not necessarily always the last item in the @/
     history.
Fix: Remember @/ in Tex_LastSearchPattern and then restore it.
2003-09-06 20:07:25 +00:00
Srinath Avadhanula e2759b1bcb - new lightweight replacement for explorer.vim 2003-09-02 07:13:44 +00:00
Srinath Avadhanula fc5ff7355a no longer need explorer.vim in latex-suite 2003-09-02 07:13:10 +00:00
Srinath Avadhanula 48fc2e5a1b Botch up with the previous addition. It got added in the main branch. I am
removing it from there and adding it into the branch as promised.
2003-08-28 19:17:48 +00:00
Srinath Avadhanula 1c87aa9b9c A lightweight replacement for explorer.vim so we can remove that.
NOTE: This is a commit on a branch. Do not use this for any production
purposes.
2003-08-28 19:16:28 +00:00
Srinath Avadhanula 2ba8e39a26 First attempt at trying to make explorer.vim not conflict with the default
explorer.vim which ships with vim. It would have been _really_ nice to have
first discussed the implementation of this feature so I could have avoided
this problem beforehand. :(
2003-06-30 01:18:52 +00:00
Srinath Avadhanula 3b3fa0ceb1 Bug: IMAP_Jumpfunc() and VEnclose() do not work with &selection =
'exclusive' (Jannie Hofmeyr, Pierre Antoine Champin)
Fix: Select one more character in 'exclusive' mode. (suggested by Pierre
     Antoine Champin).
2003-06-19 01:21:33 +00:00
Srinath Avadhanula 7ce5ea92e9 Change: Previously, if a file was not opened in any other session, then it
would open it in a new session. But for projects with lots of
        files, this can become painful. Therefore, instead of opening in
        new sessions each time, open files in the same session we used the
        first time we had to create a session.
2003-06-14 04:43:07 +00:00
Srinath Avadhanula a5cb90541d This script provides a command :RemoteOpen which is supposed to be used
from the command line as follows:

gvim -c ":RemoteOpen +<lnum> <filename>"

where <lnum> is the line-number you wish <filename> to open to.  What will
happen is that a new gvim will start up and enquire from all previous
sessions if <filename> is already open in any of them. If it is, then it
will edit the file in that session and bring it to the foreground and itself
quit. Otherwise, it will not quit and instead open up the file for editing
at <lnum>.

This was mainly created to be used with Yap (the dvi previewer in miktex),
so you can specify the program for "inverse search" as specified above.
This ensures that the inverse search uses the correct gvim each time.
2003-06-08 23:42:44 +00:00
Mikolaj Machowski e45d947591 Merging x action from main explorer.vim 2003-05-02 20:00:45 +00:00
Mikolaj Machowski cc4605241d Included project features 2003-04-23 17:28:32 +00:00
Mikolaj Machowski 08d5ec38d2 This is almost standard version of explorer plugin. This addition to lS
is necessary for things like explorer-completion.

Change is to make EditEntry function global available. It makes possible
to remap standard explorer shortcuts for better interaction with lS.
I signalized this on vim@vim.org and hope it will be standard behaviour
of explorer.vim in next Vim editions thus we won't need this file. But
for today pros are much more than contras I think.

(sorry for my english today, please correct my faults in latex-suite.txt
if you find few minutes)
2003-04-04 23:27:45 +00:00
Srinath Avadhanula 4eac530584 Bug: If an abbreviatin contains \ or " characters, then the abbreviation is
not expanded properly. (D. MacAlpine)
Fix: Those characters need to be escaped before the quoting.
2003-03-25 19:11:40 +00:00
Srinath Avadhanula 66b86d3fbc Bug: Incorrect detection of abbreviations. If there was (were)
abbreviations starting with the letter 'a', then typing 'a<space>'
     would trigger an expansion.
Cause: The :iab command also echoes for partial completions.
Solution: Check more thoroughly whether a word is an abbreviation LHS or
          not.
2003-03-25 08:20:11 +00:00
Srinath Avadhanula 7b5feffb4d Bug: iabs break when latex-suite is triggered.
(Preben Randhol, Sanip P Deshmukh)
Cause: If a mapping ends in a letter (say '\'), then abbreviations are not
    triggered by that letter. For example, if we have
        imap \ <C-r>='\'<CR>
        iab 12 twelve
    Then typing 12\ doesn't expand to twelve\.
    (Strangely enough "imap \ ?" doesn't have this problem and we get
    twelve?. Vim bug?)
    This problem is aggravated by the fact that latex-suite "protects"
    most letters to avoid expansions such as ``2 -> `\sqrt{}
Solution: After checking for mappings ending in a letter, if that letter is
    not in 'iskeyword', then also check whether the previous word has
    an abbreviation. Since vim does not have the equivalent of
    mapcheck() for abbreviations, this is complicated (maybe even hacky).
2003-02-05 23:29:04 +00:00
Srinath Avadhanula fae6eb53cf - Bug: imaps do not work on default win32 installations of vim because
:behave mswin
       is set, which in turn sets &selection=inclusive. This makes
       IMAP_Jumpfunc() skip selecting the last character of
       Imap_PlaceHolderEnd. (Sumit Bhardwaj)
  Solution: Temporarily set &selection = exclusive in IMAP_Jumpfunc().
2003-02-05 04:12:28 +00:00
Srinath Avadhanula 9186e9ff31 . Adding in the header instead of the Last Change: Wed Jan 08 04:00 PM 2003 PST
revision tag is necessary in a file, imo.
  NOTE: This wont cause spurious revisions, problems in merging etc.
2003-01-09 00:57:58 +00:00