Julien Nicoulaud
d5cceb2c34
Merge pull request #64 from Valodim/master
don't highlight anymore for long lines
13 years ago
Valodim
5f68accccf
Don't highlight if buffer is longer than $ZSH_HIGHLIGHT_MAXLENGTH
13 years ago
Julien Nicoulaud
8ebce17a11
Merge pull request #63 from garinger/master
Fix for Issue #36 "Brackets of different types matched"
13 years ago
Julien Nicoulaud
a18e43d059
Fix README links
13 years ago
garinger
e7ab165310
* optimize discrimination of bracket-type
* use a nicer variable name
13 years ago
garinger
f1eb5aeef7
skip all brackets inside quotes (" and ')
13 years ago
garinger
2fe9505647
simplify check for bracket under cursor
13 years ago
garinger
05e4a031c7
* remove a safety belt - no need to check if array has elements, as defaults are provided
* reuse $pos instead of using another variable
* remove declaration forgotten in last commit
13 years ago
garinger
d4acac9837
eliminate a variable and simplify
13 years ago
garinger
ef74d2b611
Only match brackets of the same type
13 years ago
Julien Nicoulaud
eb749f2681
Merge pull request #62 from garinger/master
Fix for Issue #35 "Unclosed brackets not marked as error"
13 years ago
garinger
48c30a805a
highlight opening bracket with "bracket-error" style, if the closing bracket is still missing
13 years ago
garinger
1858be26bd
exclude .beep
13 years ago
garinger
3802e03b4c
exclude .beep
13 years ago
Julien Nicoulaud
9e75ca0e76
Add @tednaleid to the list of contributors
13 years ago
Julien Nicoulaud
28720c77aa
Some fixes consecutive to pull request #61 merge
* Allow to override highlighters directory through `ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR`
* Handle spaces in the directory path
* Use Zsh builtin "h" modifier instead of `dirname`
13 years ago
Julien Nicoulaud
df2fe2a97d
Merge pull request #61 from tednaleid/master
Error: "unrecognized modifier 'A'" on startup for zsh 4.3.9 on OSX
13 years ago
Ted Naleid
4ed9f9a68f
fix for issue #60 , unrecognized modifier 'A' on startup
13 years ago
Julien Nicoulaud
e04f6ab862
Safety checks before looking up cursor position
13 years ago
Julien Nicoulaud
f6af27b8a6
More reliable way to hook precmd
13 years ago
Julien Nicoulaud
52bdb56fdb
Merge pull request #57 from guidovansteen/patch-1
Much easier and less error prone way to start highlighting immediately af
13 years ago
Guido
71e797a8b5
Much easier and less error prone way to start highlighting immediately after the creation of a new command line.
13 years ago
Julien Nicoulaud
bf4fe1f228
Another README link fix
13 years ago
Julien Nicoulaud
1435868740
Another README link fix
13 years ago
Julien Nicoulaud
e7d7ccfe35
Group if statements in f26310d97e
13 years ago
Guido
f26310d97e
* enable command lines starting with a hyphen.
13 years ago
Guido
56801a6b42
* added a workaround to start highlighting immediately after the creation of a new command line.
13 years ago
Julien Nicoulaud
ef4f5ed638
Fix READMEs
13 years ago
Julien Nicoulaud
bb7fcb79fa
Fix #56 : tolerance to WARN_GLOBAL option
13 years ago
Julien Nicoulaud
55e6a85fbb
Merge branch 'master' of github.com:nicoulaj/zsh-syntax-highlighting
Conflicts:
zsh-syntax-highlighting.zsh
13 years ago
Julien Nicoulaud
0772ddd346
Big refactoring.
* Don't override user defined styles
* Better modularisation of highlighters
* Allow to define which highlighters are activated
* Allow to define the order in which they are defined
* Minor performance optimizations
* Fixed some variables leak
* Improve documentation
* Brackets highlighter: use ZSH_HIGHLIGHT_STYLES instead of a specific array
13 years ago
NAKAMURA Yoshitaka
0999ab05ba
do nothing if PENDING inputs are exist
Originally, zsh-syntax-highlighting called highlight functions at every inputs.
It's OK for user's keyboard inputs. But when long inputs come from clipboard,
it cause noticeable slowdown.
13 years ago
Julien Nicoulaud
19f16752bb
Issue 49: Don't use readlink, options differ between systems
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
bc788f3f19
Start splitting highlighters to separate files.
The script still works on its own, highlighters in highlighters/ are
loaded as addons if present.
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
2f0fb81af4
More efficient way to look for elements in arrays
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
3abf463753
More code style fixes
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
2670c93e05
Make sure functions names match _zsh_highlight_*
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
dd84bff854
Code style
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
6879d3c29f
Issue 47: Removing styling of 'isearch' and 'special', as it has no effect
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
e1479022a0
Merge branch 'hchbaw-for-nicoulaj'
13 years ago
Julien Nicoulaud
69e7442e4d
Add nakamuray to the list of contributors
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
fdc113996e
Merge branch 'highlight-assignment' of https://github.com/nakamuray/zsh-syntax-highlighting into nakamuray-highlight-assignment
13 years ago
NAKAMURA Yoshitaka
390ab0fc32
Highlight variable assignment
13 years ago
Julien Nicoulaud
d66b15aeb0
Fix contributor URL
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
93c9e6a753
Split off contributors list to a separate file
Markdown for everyone
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
ca79a5f65a
Fix fish shell URL
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Julien Nicoulaud
78ff61eddc
Fix typo
Signed-off-by: Julien Nicoulaud <julien.nicoulaud@gmail.com>
13 years ago
Takeshi Banse
bb5f41ef6d
Add contrib/keyword.zsh
Signed-off-by: Takeshi Banse <takebi@laafc.net>
13 years ago
Takeshi Banse
0948c3d676
Introduce _zsh_add-highlighter.
For easily extending the highlighting behavior, split the
actual highlighting function into some pieces.
For example "_zsh_main-highlight" transformed into,
1) An actual highlighting function which updates the
`region_highlight` on its own. (_zsh_main-highlight)
2) A predicate which determines whether its highlighting function
(in this case `_zsh_main-highlight`) should be called or not.
(_zsh_buffer-modified-p)
Likewise, `_zsh_highlight-bracket-match` and
`_zsh_highlight-bracket-match-p` are born.
Eventually, `_zsh_highlight-zle-buffer` coordinates above these
functions and maintain some internal state variables.
Finally, added `_zsh_add-highlighter` a little syntactic-sugar-ish
function to register the highlighting functions in an appropriate manner.
Signed-off-by: Takeshi Banse <takebi@laafc.net>
13 years ago
Takeshi Banse
6663c5647d
Make bracket match a function.
Append it to ZSH_HIGHLIGHT_FUNCTIONS.
Signed-off-by: Takeshi Banse <takebi@laafc.net>
13 years ago