Commit graph

29 commits

Author SHA1 Message Date
Charlie Gordon
ff1952f5a0 display: improve line wrap handling
- add WRAP_AUTO and WRAP_TERM (for terminal emulator)
  WRAP_AUTO wraps lines if the window is more than 3/4 of the screen width
  if window is narrower, lines are truncated.
  WRAP_TERM does not display the \ wrapping mark to simulate terminal behavior
- add default_wrap member in ModeDef structure
- delegate to view pane for man, ssh and compile commands
2017-04-25 17:41:27 +00:00
Charlie Gordon
d329669530 buffer: new APIs
- int eb_insert_uchars(EditBuffer *b, int offset, int c, int n);
- int eb_replace_uchar(EditBuffer *b, int offset, int c);
- inline eb_insert_spaces() using eb_insert_uchars() instead
- add minp(), maxp() and clampp() with side effect on first argument
- publish ucs2 and ucs4 charsets
2017-04-25 16:46:41 +00:00
Charlie Gordon
e08867b692 basic: reduce global variable clutter
- make more registered objects static
- document some non static global objects
- remove some global variables
2017-04-16 21:51:19 +00:00
Charlie Gordon
917cf43abb markdown: fix code fragment coloring
- code fragments introduced with the ``` syntax can now be indented
2017-01-31 20:18:55 +00:00
Charlie Gordon
79bbfb27c3 markdown: fix language detection for C# and C++ 2017-01-01 15:33:18 +00:00
Charlie Gordon
b962e33ade updated copyrights 2016-03-06 19:53:06 +00:00
Charlie Gordon
c2899920de markdown: added support for literate modes
- added mkd_add_lang() to handle language tags more generically
- added default language for literate modes
- added syntax colorizer for litcoffee
2016-03-06 18:09:26 +00:00
Charlie Gordon
f0aa3a4bd8 cosmetics: untabify, remove trailing spaces 2015-08-27 23:03:39 +00:00
Charlie Gordon
ff5865af95 use qe_isblank instead of qe_isspace in syntax colorizers 2015-08-07 20:55:40 +00:00
Charlie Gordon
a80d4e2dd4 improves markdown mode
* made verbatim block coloring completely generic using language name lookup
* removed global references to most snytax coloring modes
2015-06-19 14:34:30 +00:00
Charlie Gordon
78f3b2ec0c improved markdown mode
* made language support for code blocks generic
* fixed HTML comments
* fixed state bit allocation
* improved HTML block support with fewer state collisions
* colorize text and code in block quotes
2015-06-08 09:18:45 +00:00
Charlie Gordon
9c117145dc add mode for Apple Swift language 2014-06-04 23:59:09 +00:00
Charlie Gordon
611e44403d prepare mode separation (view / syntax / data)
* add fields in EditBuffer struct
* pass buffer and flags to mode_init functions
* add default_mode_init function to avoid tests
2014-06-01 13:54:58 +00:00
Charlie Gordon
2e5cc16713 improve syntax colorizing modes consistency
* create separate modes for all syntax colorizers
* add colorizing_flags to mode structure for code sharing
* pass ModeDef struct pointer to colorizing function
* remove obsolete window fields
2014-05-30 17:18:12 +00:00
Charlie Gordon
b8004d7072 simplify mode definitions
* assume text mode primitives for MODEF_SYNTAX modes
* initialize mode structures inline instead of cloning text_mode
2014-05-29 18:29:14 +00:00
Charlie Gordon
569401da15 simplify mode init/close
* always regsister callbacks on s->top and s->top_offset
* handle saved_data generically, remove window callback
  this will be replaced with view history mecanism.
2014-05-29 10:26:13 +00:00
Charlie Gordon
851321452f use generic mode_probe function where possible 2014-05-27 15:50:47 +00:00
Charlie Gordon
f527a58e18 add mode flags to specify different types of modes
* add  mode_flags as extra argument to qe_register_mode
* change all mode registration calls accordingly
2014-05-27 12:05:52 +00:00
Charlie Gordon
2ef06f9131 pass QEColorizeContext to ColorizeFunc callbacks
* pass state and state_only as members of QEColorizeContext
* simplify ColorizeFunc, make them more consistent
* use offsets instead of pointers to prepare for further API changes
2014-04-05 15:49:14 +00:00
Charlie Gordon
b1ab7efb54 improve colorizers
* use mode specific namespace for colorizer states and styles
* use enum values instead of preprocessor macros for states and styles
2014-04-02 12:58:12 +00:00
Charlie Gordon
b2c2c9374e improve c-mode, add mode_flags to handle language mode flavors
* add mode_flags and mode_name in EditState
* pass mode_flags to ColorizeFuncs
* define several CLANG mode flavors for C, C++, Javascript, Java, etc.
* add flavor specific keyword lists for c-mode
* add regex support in c-mode for Javascript flavor
2014-03-24 10:58:09 +00:00
Charlie Gordon
0e9fbc96a1 add tabify / untabify support
* add tabify-buffer and tabify-region
* add untabify-buffer and untabify-region
* make eb_delete and eb_delete_range return actual number of bytes removed
* simplify some deletions with better use of eb_delete_xxx functions
2014-03-21 20:49:30 +00:00
Charlie Gordon
3246605e1b improve colorizer for long lines
* use COLORED_MAX_LINE_SIZE for line buffers
* incomplete fix for "ERROR: cursor not found" bugs
2014-03-18 08:20:04 +00:00
Charlie Gordon
e006f6cb60 fix small issues in markdown-mode
* skip initial * in colorizer
* force indentation with spaces
* default to word-wrap mode
2014-03-15 13:47:26 +00:00
Charlie Gordon
0052071fb2 use SET_COLOR macros in various colorizers
* use macro to prepare for coloring API change
* done for lisp-mode, markdown-mode, perl-mode, shell-script-mode,
  org-mode, makefile-mode
2014-03-10 22:11:24 +00:00
Charlie Gordon
fcea31f526 improve python mode, add ruby mode
* add raw string parsing for python-mode
* add Ruby coloring mode
2014-03-10 02:03:39 +00:00
Charlie Gordon
562d1e34b1 add python-mode
* add support for python coloring.
2014-03-07 17:34:24 +00:00
Charlie Gordon
5f9ec8d28e exten markdown-mode
* support more embedded languages: java, lua, haskell, python, ruby
* python and ruby are detected in markdown, but not yet implemented
* accept git syntax for code blocks ```lang
2014-03-07 10:29:53 +00:00
Charlie Gordon
fe70947cd4 add markdown-mode for John Gruber's Markdown syntax
* detect markdown files on extension: *.md and *.mkd
* support some pandoc extensions
2014-03-07 02:30:03 +00:00