Commit Graph

28 Commits

Author SHA1 Message Date
Daniel Robertson
7e7b238da6 Add common types and keywords to c-family syntax
Add a few more common types and C++ extensions to c-family
syntax file
2015-11-06 08:55:23 -05:00
angt
c4060a790f Add some c-family keywords 2015-11-02 19:12:51 +01:00
Maxime Coste
7581cde87a Merge remote-tracking branch 'lenormf/rc/c-family.kak' 2015-10-28 00:06:25 +00:00
Frank LENORMAND
cbfc6d3cd0 Allow different type of pre-processing guards to be included in C
headers.

This commit introduces the `c_include_guard_style` option, which can
take one of the following values: "ifdef", "pragma", "none". The
corresponding type of guard will be used accordingly to the value of
this variable.
2015-10-27 17:23:04 +03:00
Frank LENORMAND
f7e976676c Introduce the commenting.kak file
Centralize commenting functions into a single file, and declare
variables used by those functions in language support files. The
functions are `comment-selection` and `comment-line`, users should bind
those functions to the keys of their liking for easy access.
2015-10-25 15:54:17 +03:00
Frank LENORMAND
8f432a2eea Introduce formatter.kak to handle formatting.
The modified files used to handle formatting code with the same code,
and a different command, the process is now centralized into a single
file. Language support files should set the `formatcmd` string to
whatever formatter is the most popular in their respective community,
eventually with default options.
2015-10-22 16:41:19 +03:00
Frank LENORMAND
1713f14d5c Add an alias for commenting whole lines, fix the call to unalias 2015-10-21 07:50:11 +03:00
Frank LENORMAND
f2eb2e8b1c Add support for astyle code-formatting 2015-10-11 17:41:14 +03:00
Brayden
d12be9fdc1 Support paths with spaces for c-family :alt 2015-10-01 11:38:58 -07:00
Maxime Coste
20f744bd53 Remove useless try blocks in comment functions
We should not have exceptions raised there, if there is, do not
ignore them
2015-09-22 19:09:54 +01:00
Maxime Coste
6c73d6e794 Merge remote-tracking branch 'lenormf/rc/c-family.kak-comment' 2015-09-22 19:06:26 +01:00
Maxime Coste
7750df787a Try to manually detect if .h files are c or cpp 2015-09-22 19:01:15 +01:00
Frank LENORMAND
c7f568f696 Clean up and improve the commenting functions
Simplifies the selection commenting function, add proper draft options
to the exec statements, and make the uncommenting bit keep the selection.

Add a function that comments the current line with "//", uncommenting is
supported as well.
2015-09-22 14:32:14 +03:00
Maxime Coste
70fdd068dc c-family.kak: add plain c highlighter and detection
Give priority to extension over detected mimetype, as
file often takes c++ files to be c files.
2015-09-21 23:36:20 +01:00
Maxime Coste
3b1d15bf8b Merge remote-tracking branch 'lenormf/rc/c-family.kak-comment' 2015-09-21 13:40:37 +01:00
Frank LENORMAND
ac98699cf9 Add a comment-selection function 2015-08-11 14:04:24 +03:00
Frank LENORMAND
0000dd4705 Add the double type to the list of highlighted types 2015-08-11 08:16:04 +03:00
Frank LENORMAND
6d70c37bd3 Add support for hexadecimal numbers to the C family languages 2015-07-20 17:31:33 +03:00
Maxime Coste
1bbb4ce29c Add some missing operators to C++ highlighting 2015-04-30 13:45:48 +01:00
Maxime Coste
dd9533e625 Small tweak in c-family-alternative-file error handling 2015-04-21 13:21:24 +01:00
Maxime Coste
abe3856d29 c-family.kak: Just remove trailing indent on InsertEnd 2014-12-18 19:33:57 +00:00
Maxime Coste
8d7ddfdf8b Only remove trailing whitespaces on InsertEnd when last insert was auto indent
Fixes #242
2014-12-17 13:58:05 +00:00
Maxime Coste
51b88bef10 small tweak in objective c highlight 2014-12-03 19:46:55 +00:00
Jimmy Thrasher
eddad89915 Support @"" style strings for Obj-C syntax highlighting 2014-12-02 11:44:02 -05:00
Jimmy Thrasher
e540dc7f9e Add mime-type check for Obj-C in case the user's file cmd supports it 2014-12-02 11:15:53 -05:00
Jimmy Thrasher
d73fe2cc6d Add some missing obj-c highlight patterns to the new c-family.kak 2014-12-02 09:39:57 -05:00
Maxime Coste
798d4c3a1e use printf rather than echo in c-family.kak
According to POSIX, echo with a backspace in any arg is undefined
behaviour...
2014-12-01 19:33:15 +00:00
Maxime Coste
6c45b1d1e2 Try to unify objective c and cpp in a c-family.kak file 2014-12-01 13:52:24 +00:00