make sure vim knows the script is UTF-8 encoded (otherwise it will complain in some configurations
To prevent this from happening: http://stackoverflow.com/questions/8395923/vim-configuration-throwing-errors-on-one-machine-but-not-the-other
[Git] Ignore the doc/tags directory
Now you can specify only the keys you want to behave differently when the popup menu is visible.
adding 'gnome' to the list of worked around terminals Fixes #30
…lose into artm-expand-whitespace Conflicts: plugin/AutoClose.vim
key mapping fixes
Simpler configuration, no default FileTypes, less defaults
Use xnoremap for visual mode mappings
Mac vim defines some alternative motion mappings using Cmd- and Alt- (<D-> and <M->) modifier keys. These are now handled correctly with respect to pair closers buffer. To be able to do that I had to work around two other problems: 1) the AutoClosePumvisible_XXX variables were generated for keys that require special handling when popup menu is visible. This system broke on modified keys such as <D-Left> attemping to eval let `b:AutoClosePumvisible_D-Left = ...` and failing. This is solved by placing all these values in a single dictionary, so the code above becomes: b:AutoClosePumvisible["D-Left"] = ... 2) remapping keys that already had mappings (like those installed by MacVim) would lose the mapping. This is solved by using the existing mapping inside ours (so the mapping is extended, not replaced) I think there are still some more motion keys we forgot, which I don't use on MacVim (e.g. <C-Left>, <C-Right>) which should be added to default list of motions. But someone should test them first (they are bound to something else globally on my OS).
1. the dot register preservation is g: only I don't see the point of maintaining it on a per buffer basis. 2. remapping of the terminal escape codes happens once. This probably still breaks some terminals or some escape sequences we don't remap, but at least this is not worse then the original solution. 3. fixed typo in the setting name
Expands space inside empty pair as <Space><Space><Left>, resulting in: ( | ) Hmm... that ASCII-graphic doesn't look work safe.
This is a response to #21. Introduces two new configuration variables (g:AutoClosePairs_add / _del) and simpler customization of g: or b:AutoClosePairs (which now can be set to a string, which is parsed by the plugin when necessary).
Fixed AutoClose#DefaultPairs to not throw errors on startup.
Few typo fixes
Easy config and code refactoring
This way it's easier to override per filetype settings
1. more intention revealing names 2. helper functions to further elucidate intention (and avoid redundancy) 3. got rid of b:AutoCloseQuotes list for the sake of single source of truth principle. the optimization provided by precomputing list is negligible. 4. user config utilities 5. documentation 5.1. Typo (AutoComplete -> AutoClose) 5.2. Shorter section of protected regions and mention per-buffer 5.3. Formatting 5.4. Documented new configuration facilities 5.5. Removed known problem from the documentation since solution exist in at least three forks, including the official one.
1. file type handling moved outside the function. the way it was done before was clashing with user FileType autocommands. 2. dictionary of default pairs available with a function. Useful to for slight modifications of defaults in autocommands. 3. no more reset argument (it isn't necessary if file type autocommands are defined after the default buffer new/read/enter autocommands). BTW, why is BufEnter even there? 4. some code simplification
More intention revealing names. Also tiny refactorings where necessary.
otherwise AutoClose#* functions don't work on systems with case sensitive file system.