Git Product home page Git Product logo

vim-smartinput's People

Contributors

kana avatar milly avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim-smartinput's Issues

Lookahead

If I have my cursor like so:
test(┃one')
and try to set the left single-quote, I get two:
test('┃'one')
and whether I move the cursor right and delete:
test(''┃one')
or merely delete in place, the result has me back to where I started:
test(┃one')

Add rules for Vim script to insert comments/strings

In vim filetype, " has two roles. One is a string literal, and the other is a comment sign. So that the ideal behavior is to:

  • Insert "" if a string can be inserted into the cursor position, or
  • Insert " as a comment otherwise.

The current default rules doesn't care about inserting comments.

Escaped quotes trick smartinput

at least in javascript:

if you type 'hello then type \' including backslash, it incorrectly removes the ending single quote and leaves you in hell

C-like syntax breaks paste

If I yank some text, create a pair of brackets and hit enter to expand then C-style, and then try to paste, the text I yanked is lost.

Curly brace closure in SASS/SCSS works poorly

Maybe I'm doing something wrong, but here's how it works out when trying to do nested braces in SASS:

body {
   div {
}
}

Instead of indenting the inner closing brace, it shifts it all the way over to left. Thoughts?

Reconsider using :map-<expr> to s:do_smart_input_assistant

For some reason I chose not to use :map-<expr> to do s:do_smart_input_assistant.
However, as I reviewed the code to fix #7, it seems to be possible to use :map-<expr>.
Let's reconsider using :map-<expr> to s:do_smart_input_assistant.
If it's possible, the complex cursor adjustment can be removed.

Improve the behavior of symbol completion at a middle of a line

For example, if the cursor line is foo |bar) (note that | means the cursor position),

  • Should not () be completed if ( is typed at the point?
  • What are appropriate conditions not to complete () etc?
    • \%#$ (at the end of a line) or \%#\K\(.\&\k\@!\) (followed by non-keyword character)?

Problem with suptertab and <BS>

Minimal installation for reproduction:
https://github.com/kusnier/supertab_smartinput_problem

How to reproduce:

$ vim

Enter: test<TAB><BS>

Vim is now in a recursion. Abort with <C-c>

Result:

test<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("\<SNR>12__trigger_or_fallback("")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")")

<BS> doesn't seem to work.

I'm using an up to date MacVim 7.3 both in GUI and CLI mode on Mac OS X 10.6.8 and a slightly older Vim 7.3 also in GUI and CLI mode on Ubuntu 10.10.

When I type (, smartinput correctly inserts the matching ) but I'm not able to "undo" the () pair by hitting <BS>. Only the first ( is deleted instead of both parenthesis. Of course, it's the same for all the other pairs ''""{}[].

Please let me know if you need more informations.

Thank you.

Reconsider "syntax" matching algorithm

For example, the default syntax file for lisp:

  • Defines lispString for string constants, then
  • Links lispString to String, and
  • String is liked to Constant by default.

Therefore:

  • synIDattr(id, 'name') returns 'lispString'.
  • synIDattr(synIDtrans(id), 'name') returns 'Constant'.
  • And there is no simple way to detect whether a character is highlighted as String or not.

Currently synIDtrans()ed values are used to match "syntax" of rules. This
means that only Constant is a valid value for "syntax".
But Constant implies String, Number and other constants. If user wants to define rules only for String, such rules will never be used with the current behavior.

There are 4 options for the problem:

  • Use "wide" syntax names like Constant.
    • Merits:
      • No cost to implement -- this is the current behavior.
      • Easy to define generic rules on specific syntax items.
    • Demerits:
      • Not possible to define pinpoint rules on "detailed" syntax items like lispString.
  • Use "detailed" syntax names like lispString.
    • Merits:
      • Easy to implement -- just remove the use of synIDtrans().
      • Possible to define pinpoint rules on "detailed" syntax items like lispString.
    • Demerits:
      • Hard to define generic rules on specific syntax items.
  • Use both "wide" and "detailed" syntax names.
    • Merits:
      • Easy to define generic rules on specific syntax items.
      • Possible to define pinpoint rules on "detailed" syntax items like lispString.
    • Demerits:
      • Somewhat bad performance
        -- though it might be acceptable.
  • Use all, "wide" and "middle" and "detailed", syntax names.
    • Merits:
      • Maximum flexibility to define rules on specific syntax items.
    • Demeris:
      • Very bad performance
        -- the only way to get "middle" syntax names is to parse result of :highlight.

Let's reconsider which is the best way to deal with "syntax" matching.
Consider also actual usage and other possibility.

Versus vim-smartchr

For example,

  • IEnumerable# -- < -> IEnumerable<#> (with vim-smartpunc) is useful to write type pameters in C#.
  • _<_ <--> < (read _ as a whitespace / with vim-smartchr) is useful to write comparison expressions.

Both configurations are conflicted. What is the best way to coexist such configurations?
Some thoughts:

  • Both plugins have the similar purpose that is to support user's input.
  • vim-smartpunc is mostly a superset of vim-smartchr.
    So that conflicts can be resolved by using only vim-smartpunc
    if it supports features which are available only in vim-smartchr.
  • vim-smartchr is available in both Insert mode and Command-line mode,
    while vim-smartpunc is available only in Insert mode.
    • It's hard to make vim-smartpunc available in Command-line mode
      because of the current implementation,
      especially for interpretation of "at" in Command-line mode.
    • But Command-line mode is the mode to input Ex commands interactively.
      Though input assistants are useful to write source code,
      I doubt that such assistants are also useful in Command-line mode,
      because most input is very short commands such as :wqall
      or commands with special syntax such as :s/.../.../g.
      It's rarely to type complex expressions in Command-line mode.
      So, is it really necessary to support Command-line mode?
  • vim-smartpunc provides flexible rules to configure its behavior,
    while vim-smarchr is not so flexible.
    • On vim-smartpunc, it's easy to write context-sensitive rules with "at", "filetype" and "syntax".
    • On vim-smartchr,
      "at" is not configurable ('foo\%#'-style only),
      "filetype" depends on how rules are defined (e.g. via filetype plugins or :autocmd FileType)
      and "syntax" is not supported completely.
    • On vim-smartpunc, it's possible to specify an arbitrary "input" for any rule.
    • On vim-smartchr,
      "input" is limited to a normal string,
      in other words, it's not possible to adjust the cursor position.

Problem with block insert

Steps to reproduce:

  1. Start with a empty file, insert say 4 blank lines
  2. Start visual-block mode (ctrl-v) and select the beginning of the 4 empty lines
  3. Start block insert by pressing I (capital "i")
  4. Enter { foo }

When the closing curly brace is entered the following happens:

:call search('}', 'cW')
{ foo }
{ foo }
{ foo }
{ foo }

If you don't enter the closing brace "manually" everything works as expected when leaving insert mode (ESC). The same problem occurs when entering square brackets and parenthesis but not when entering single or double quotes for instance.

Using v0.0.3.

Choice minimum rules for the default ones

So many men, so many minds. The "expected" behavior of operator rules depends on users' tastes and 'filetype'. So that it's hard to define the default rules on operators.
Therefore:

  • Remove all rules on operators such as =.
  • Keep only rules on parentheses.
  • Refine rules on parentheses, especially for linebreak. → gh-3

Weight modifier

Hi,

Could you add a parameter to the rule definition that can modify the rule weight, such as

{at: '...', 'char': '...', input: '...', 'weight': 5} -> rule weight = 5 + original weight

. This is required because sometimes the number of character in the regexp does not correlate to the specificity of the regexp

For example

\%#} is more specific than \%#\s*}

Disable completion while typing

Maybe I just haven't found this, but sometimes I don't want to have the completion and only want to enter one " without the automatic completion to "" . How can I do this?

Add an option to specify remappability of alternative/fallback input

Currently both alternative input and fallback input are not remapped.
But there should be an option to specify a remappability of both types of input.

  • Remappability of fallback input should be configured for each trigger lhs?
  • Remappability of alternative input should be configured for each rule?

<C-h> in Command-line mode does not update the screen immediately

Reproduced on Windows 7 Professional SP1 32-bit with the following version of gvim:

VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Nov  4 2011 08:50:34)
MS-Windows 32-bit GUI version with OLE support
Included patches: 1-353
Compiled by [email protected]
Huge version with GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments +conceal +cryptv +cscope +cursorbind +cursorshape 
+dialog_con_gui +diff +digraphs -dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +float +folding -footer +gettext/dyn -hangul_input +iconv/dyn +insert_expand +jumplist
 +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +lua/dyn +menu +mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn +multi_lang -mzscheme +netbeans_intg +ole +path_extra 
+perl/dyn +persistent_undo -postscript +printer +profile +python/dyn -python3 +quickfix +reltime +rightleft -ruby +scrollbind +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax 
+tag_binary +tag_old_static -tag_any_white -tcl -tgetent -termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo +vreplace +wildignore +wildmenu 
+windows +writebackup -xfontset -xim -xterm_save -xpm_w32 
   system vimrc file: "$VIM\vimrc"
     user vimrc file: "$HOME\_vimrc"
 2nd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
  2nd user exrc file: "$VIM\_exrc"
  system gvimrc file: "$VIM\gvimrc"
    user gvimrc file: "$HOME\_gvimrc"
2nd user gvimrc file: "$VIM\_gvimrc"
    system menu file: "$VIMRUNTIME\menu.vim"
Compilation: gcc -O3 -fomit-frame-pointer -freg-struct-return -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_HUGE -DWINVER=0x0400 -D_WIN32_WINNT=0x0400 -DFEAT_PERL -DDYNAMIC_PERL -DDYNAMIC_PERL_DLL="perl58.dll" -DFEAT_PYTHON -DDYNAMIC_PYTHON -DDYNAMIC_PYTHON_DLL="python27.dll" -DFEAT_LUA -DDYNAMIC_LUA -DDYNAMIC_LUA_DLL="lua51.dll" -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEAT_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_OLE -march=i386 -Iproto -I/cygdrive/c/strawberry/perl/lib/CORE -I/cygdrive/c/PROGRA~2/Lua/5.1/include -s -mno-cygwin
Linking: gcc -s -o gvim.exe  -luuid -lole32 -lwsock32 -mwindows -lcomctl32 -lversion -loleaut32 -lstdc++

Optimize speed to :source the autoload file

As many default rules are defined, now it takes about 4000 milliseconds to :source the autoload file, but the smart input assistant is not so slow.
Possible bottleneck:

  • smartpunc#define_rule() sorts available nrules for each time.

help with custom mapping

Hi,

I jsut try to add some custom mapping for ruby here what I want to do

# => #{} only inside a string
| => || always

but it didn't work and I can't find a clear exemple of adding customme mapping. Could yuo please help and maybe we can add some sample to the documentation

here waht i add to my vimrc file

smartinput#map_to_trigger('i', '|', "|")

smartinput#define_rule({'at': '\%#', 'char': '#', 'input': "#{}\<Left>" ,'filetype': ['ruby'], 'syntax':['Constant']})
smartinput#define_rule({'at': '\%#', 'char': '|', 'input': "||<Left>" ,'filetype': ['ruby']})

No way to leave a C-style multiline {} block

With this "before":

{
    asdf#
}

When I type <enter>}, I would expect to get:

{
    asdf
}#

But instead, I get:

{
    asdf
}#
}

Could this be fixed to allow leaving the block easily just as you can do on single lines?

{<enter>} doesn't respect shiftwidth

I have my shiftwidth set to 2 (as well as my tabstop), so when I input {<enter>, I expect the following:

{
  #
}

With two spaces. Instead, I get 4 spaces:

{
    #
}

Looks like the plugin isn't respecting shiftwidth and always shifting 4 spaces.

Disable smart input assistant in Replace mode

In Replace mode, smart input assistant is usually useless. Especially, () completion causes unnatural result. Disable smart input assistant in Replace mode to avoid such problems.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.