Git Product home page Git Product logo

ne's People

Contributors

abelbeck avatar alehed avatar dmt4 avatar em1lyy avatar fornwall avatar honzaskypala avatar jooadam avatar polluks2 avatar rofl0r avatar unbrand avatar utoddl avatar uvtc avatar vigna avatar zciurus-alt-del 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ne's Issues

Building Against netbsd-curses

Build fails when building against netbsd-curses...

c99 -D_REGEX_LARGE_OFFSETS -D_GNU_SOURCE -DSTDC_HEADERS -Dinline=inline -O3 -DNDEBUG -D_FORTIFY_SOURCE=2 -c -o term.o term.c
term.c: In function ‘set_attr’:
term.c:360:30: error: too few arguments to function ‘tparm’
const char * const buf = tparm(ne_set_foreground , joe2color(attr >> FG_SHIFT));
^~~~~
In file included from term.c:31:0:
/usr/include/term.h:1961:9: note: declared here
char * tparm(const char *, long, long, long, long, long,
^~~~~
term.c:366:30: error: too few arguments to function ‘tparm’
const char * const buf = tparm(ne_set_background , joe2color(attr >> BG_SHIFT));
^~~~~
In file included from term.c:31:0:
/usr/include/term.h:1961:9: note: declared here
char * tparm(const char *, long, long, long, long, long,
^~~~~
term.c: In function ‘set_scroll_region’:
term.c:515:37: error: too few arguments to function ‘tparm’
if (ne_change_scroll_region) buf = tparm (ne_change_scroll_region, start, stop);
^~~~~
In file included from term.c:31:0:
/usr/include/term.h:1961:9: note: declared here
char * tparm(const char *, long, long, long, long, long,
^~~~~
term.c:516:13: error: too few arguments to function ‘tparm’
else buf = tparm (ne_set_window, start, stop, 0, ne_columns - 1);
^~~~~
In file included from term.c:31:0:
/usr/include/term.h:1961:9: note: declared here
char * tparm(const char *, long, long, long, long, long,
^~~~~
term.c: In function ‘insert_chars’:
term.c:775:28: error: too few arguments to function ‘tparm’
const char * const buf = tparm (ne_parm_ich, width);
^~~~~
In file included from term.c:31:0:
/usr/include/term.h:1961:9: note: declared here
char * tparm(const char *, long, long, long, long, long,
^~~~~
term.c: In function ‘delete_chars’:
term.c:865:28: error: too few arguments to function ‘tparm’
const char * const buf = tparm(ne_parm_dch, n);
^~~~~
In file included from term.c:31:0:
/usr/include/term.h:1961:9: note: declared here
char * tparm(const char *, long, long, long, long, long,
^~~~~
term.c: In function ‘do_multi_ins_del’:
term.c:880:28: error: too few arguments to function ‘tparm’
const char * const buf = tparm(multi, n);
^~~~~
In file included from term.c:31:0:
/usr/include/term.h:1961:9: note: declared here
char * tparm(const char *, long, long, long, long, long,
^~~~~
term.c: In function ‘calculate_costs’:
term.c:960:21: error: too few arguments to function ‘tparm’
char *const buf = tparm(ne_repeat_char, ' ', 1);
^~~~~
In file included from term.c:31:0:
/usr/include/term.h:1961:9: note: declared here
char * tparm(const char *, long, long, long, long, long,
^~~~~
term.c: In function ‘copy_caps’:
term.c:1026:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_column_address = column_address;
^
term.c:1027:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_row_address = row_address;
^
term.c:1029:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_address = cursor_address;
^
term.c:1031:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_carriage_return = carriage_return;
^
term.c:1033:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_home = cursor_home;
^
term.c:1034:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_to_ll = cursor_to_ll;
^
term.c:1036:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_right = cursor_right;
^
term.c:1037:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_down = cursor_down;
^
term.c:1038:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_left = cursor_left;
^
term.c:1039:15: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_up = cursor_up;
^
term.c:1044:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_clr_eos = clr_eos;
^
term.c:1045:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_clear_screen = clear_screen;
^
term.c:1047:10: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_bell = bell;
^
term.c:1048:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_flash_screen = flash_screen;
^
term.c:1050:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_scroll_forward = scroll_forward;
^
term.c:1051:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_scroll_reverse = scroll_reverse;
^
term.c:1053:23: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_delete_mode = enter_delete_mode;
^
term.c:1054:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_exit_delete_mode = exit_delete_mode;
^
term.c:1055:23: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_insert_mode = enter_insert_mode;
^
term.c:1056:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_exit_insert_mode = exit_insert_mode;
^
term.c:1058:25: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_standout_mode = enter_standout_mode;
^
term.c:1059:24: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_exit_standout_mode = exit_standout_mode;
^
term.c:1063:26: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_change_scroll_region = change_scroll_region;
^
term.c:1065:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_insert_line = insert_line;
^
term.c:1066:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_parm_insert_line = parm_insert_line;
^
term.c:1067:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_delete_line = delete_line;
^
term.c:1068:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_parm_delete_line = parm_delete_line;
^
term.c:1070:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_insert_character = insert_character;
^
term.c:1071:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_insert_padding = insert_padding;
^
term.c:1072:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_parm_ich = parm_ich;
^
term.c:1074:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_delete_character = delete_character;
^
term.c:1075:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_parm_dch = parm_dch;
^
term.c:1079:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_invisible = cursor_invisible;
^
term.c:1080:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_cursor_normal = cursor_normal;
^
term.c:1082:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_init_1string = init_1string;
^
term.c:1083:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_init_2string = init_2string;
^
term.c:1084:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_init_3string = init_3string;
^
term.c:1085:19: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_ca_mode = enter_ca_mode;
^
term.c:1086:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_exit_ca_mode = exit_ca_mode;
^
term.c:1088:25: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_exit_attribute_mode = exit_attribute_mode;
^
term.c:1089:27: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_exit_alt_charset_mode = exit_alt_charset_mode;
^
term.c:1091:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_repeat_char = repeat_char;
^
term.c:1097:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_meta_on = meta_on;
^
term.c:1098:14: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_meta_off = meta_off;
^
term.c:1100:16: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_set_window = set_window;
^
term.c:1102:18: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_keypad_local = keypad_local;
^
term.c:1103:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_keypad_xmit = keypad_xmit;
^
term.c:1105:13: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_clr_eol = clr_eol;
^
term.c:1109:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_set_background = set_a_background;
^
term.c:1110:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_set_foreground = set_a_foreground;
^
term.c:1113:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_set_background = set_background;
^
term.c:1114:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_set_foreground = set_foreground;
^
term.c:1117:26: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_underline_mode = enter_underline_mode;
^
term.c:1118:25: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_exit_underline_mode = exit_underline_mode;
^
term.c:1120:21: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_bold_mode = enter_bold_mode;
^
term.c:1121:22: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_blink_mode = enter_blink_mode;
^
term.c:1122:20: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_dim_mode = enter_dim_mode;
^
term.c:1123:24: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_enter_reverse_mode = enter_reverse_mode;
^
term.c:1124:25: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
ne_exit_attribute_mode = exit_attribute_mode;
^
make[1]: *** [: term.o] Error 1
make[1]: Leaving directory '/tmp/archives/ne/src/ne-3.0.1/src'
make: *** [makefile:16: build] Error 2
==> ERROR: A failure occurred in build().
Aborting...

Perhaps you can provide an ne.info to tic -s into a CDB terminfo file?

[Syntax Highlighting] Recognise ES6 Splats

In JavaScript ES6, they added a prefix operator (...) for gathering arguments into an array and for spreading an array into arguments.

  1. It can appear before a param (in function/generator statements/expressions), and is used to gather arguments into an array:

    let f = function (...args) { console.log(args) };
  2. It can also appear before an argument to an invocation. The argument (which must be an expression that evaluates to a sequence) is expanded into individual arguments:

    f(...[1, 2, 3]);

The JavaScript highlighter currently treats both cases as syntax errors.

modeline

It would be awesome if you could add modeline support,

e.g.

-- mode: python --

vi: set ft=python :

Paragraph command not respecting leading non-content formatting characters

Given this paragraph:

> foo bar
> aoeu aoeu
> baz moo

I'd expect [p to give me:

> foo bar aoeu aoeu baz moo

but instead it gives me:

> foo bar > aoeu aoeu > baz moo

I see the same problem with //, *, #, and so on. Works fine if the leading / left-hand-side characters are only spaces.

This is with ne v3.1.2 running on a fully updated Debian "Testing".

The docs for paragraph indicate ne should support this smart Paragraph behaviour, and I thought it got this feature years ago.

I think it's an extremely useful and necessary feature. I write lots of code comments (prefixed with // or # ) and markdown blockquoted paragraphs (prefixed with > ) --- it would be painful if ne couldn't Paragraph them while preserving the left-hand-side prefixins.

Actually, I'd expect that for any series of lines, ne should be able to identify if every line starts with the same prefix (whatever it may be --- different programming languages may use different commenting/quoting/whatever styles), and preserve that pattern when Paragraphing it. For example, I'd expect ne to be able to correctly Paragraph:

// XXX This comment is all kinds of important. I'm not kidding. Please keep reading!
// XXX Make a note of it in your records.
// XXX And
// XXX also watch for detritus.

I'm not sure why ne would be limited to special-cases like // and > .

Syntax highlighting problem

I know "ne" is capable of doing colors because of the screenshot on your main page but I can't get it to work on any platform. So far I've tried cygwin, gnome-terminal and rxvt-unicode.

Here is a screenshot taken from Windows 7 for a lua sample code: http://i.imgur.com/f1iNI5C.png

docs for Shift

Looks like the top line ends with one too many close brackets.

Also, regarding the doc content, in the first paragraph, should it specify that the default is 't'? That is, instead of

The default is 1.

it should be

The default is 1 t.

?

Static linking

Hello, is that possible to have a static linking version of the editor?

Thanks a lot.

docs for Paragraph

By default, [p runs the Paragraph command, and the menu agrees, but the docs for Paragraph says its ^[p (ctrl-alt-p).

Icon for ne

Problem: In UI-driven package managers or at services like alternativeto.net it ne is usually represented without a logo or icon. While it will be no problem for people compiling it themselves, it might lead to less savvy users overlooking ne.

Possible Solution: Create a simple icon. In the most simple case, it could be the letters ne on some background. I could do it, if there is interest (or you post it to https://opensourcedesign.net/jobs/job-form/ )

Problematic Installation on CentOS

Tried to install ne on CentOS 6.6,
I believe I got the binary working, but it wasn't a smooth experience,
so I figure it would help to provide a feedback :

make install failed as it required makeinfo.

makeinfo -D autohelp ne.texinfo
make[1]: makeinfo: Command not found
make[1]: *** [enums.h] Error 127
make[1]: Leaving directory
make: *** [build] Error 2

makeinfo can be found in the texinfo package sudo yum install texinfo, which is not too obvious.
Once installed, compilation proceeds smoothly, but installation fails (somewhat) as some doc files are missing :

cp: cannot stat `doc/ne.pdf': No such file or directory
cp: cannot stat `doc/html': No such file or directory
cp: cannot stat `doc/ne.txt': No such file or directory
make: *** [install] Error 1

In fact the binary is working, so I figure only the doc are missing.

There is a makefile into the doc directory, so tried to use it, in case it would generate the missing files. It triggers some new errors :

texi2dvi --clean ne.texinfo
make: texi2dvi: Command not found
make: *** [ne.dvi] Error 127

texi2dvi is supposed to be part of texinfo, but maybe not in the version of CentOS 6.

Well, hope it helps create a better installation experience.

[Feature Request] enhance MoveEOW

Currently, after MoveEOW takes you to (one past) the end of a word, repeated use of it does nothing. I propose that if you're already past the end of a word (that is, between words), then another use of MoveEOW would then take you to the end of the next word. (Note: if the cursor is somewhere in a word, then MoveEOW would behave just as it always has.)

This change would allow users to repeatedly move forward-by-word, analogous to NextWord, and would also allow users to move forward- and back-by-word in the same manner that most GUI apps support (I have the commands mapped to Ctrl-Right/Left arrow keys). I noticed recently that the bash shell supports this style of -by-word navigation as well.

The docs for MoveEOW say, "moves the cursor one character past the end of the current word.". If the cursor has been moved one character past the end of the current word, then by definition, the cursor no longer has a current word (since the cursor is now actually between words).

Finally, if a user already has the cursor one past the end of a word, and they exec MoveEOW, they presumably want to move the cursor to (past) the end of some word, and the only one that makes sense is the next word in front of the cursor.

Can`t make ne under ubuntu

Hello.
I can`t build ne under Ubuntu 14.04x64.

STR:

  1. git clone [email protected]:vigna/ne.git
  2. cd ne
  3. make install

Actual result:
mkdir -p /usr/local/bin
mkdir -p /usr/local/share/ne/syntax
mkdir -p /usr/local/share/ne/macros
mkdir -p /usr/local/share/man/man1
mkdir -p /usr/local/share/doc/ne
mkdir -p /usr/local/share/info
cp -pf src/ne /usr/local/bin
cp: cannot stat ‘src/ne’: No such file or directory
make: *** [install] Error 1

Expected result:
Successfully build ne.

Additional info:
make output:
make
( cd src; make clean; make NE_GLOBAL_DIR=/usr/local/share/ne; strip ne )
make[1]: Entering directory /home/user/distr/ne/src' rm -f ne *.o *.gcda *.gcda.info *.gcno core make[1]: Leaving directory/home/user/distr/ne/src'
make[1]: Entering directory /home/user/distr/ne/src' c99 -D_REGEX_LARGE_OFFSETS -D_GNU_SOURCE -DSTDC_HEADERS -Dinline=__inline__ -O3 -DNDEBUG -c -o actions.o actions.c In file included from actions.c:22:0: ne.h:44:20: fatal error: curses.h: No such file or directory #include <curses.h> ^ compilation terminated. make[1]: *** [actions.o] Error 1 make[1]: Leaving directory/home/user/distr/ne/src'
strip: 'ne': No such file
make: *** [build] Error 1

Completion on the command line

I was surprised that the command line does not offer the same completion feature that is available for file names. It would make access of commands not bound to keys much more quicker for the advanced user.

YAML comments syntax highlighting

As per the YAML specification:

Comments must be separated from other tokens by white space characters.

The current syntax highlighting for YAML does not require whitespace to be present before the # sign, visually breaking lines containing e.g. filenames like ne’s own autoprefs.

Line does not update properly with syntax highlighting

I built ne from the 3.1.1 tarball and the cloned git repo. Everything works except the text does not update correctly when I have syntax highlighting enabled.
It works fine when I append text to the line, it does not work when I edit the line itself; the characters are not updated until I manually redraw the screen or enough characters are added(the whole line is not updated). When I make a new line the content after the cursor is pushed to the new line and displayed correctly.

I've tried compiling with -std=c99 and without -O3

gcc version 6.2.0

build fails

make PREFIX=/opt/ne build install
cd doc; make )
/usr/local/share/doc
make[1]: Entering directory '/usr/local/share/doc'
make[1]: *** No targets specified and no makefile found. Stop.
make[1]: Leaving directory '/usr/local/share/doc'
make: *** [makefile:28: docs] Error 2

Feature request: Internationalisation

I'm not sure how to do this, I'd just like to be able to use ne in my own language rather than English.

I've seen other C programs use GNU's gettext for this, but I guess you don't want to depend on GNU stuff if you want ne to run on many different Unixes (Unices?).

Esc-F1 in menu inserts string 'OP' into buffer

Hitting Esc followed by F1 (without waiting for Esc to time out) while the menu is open, inserts the literal string 'OP' into the buffer at the cursor position.

I’m not sure if this is a feature :)

Defining Home and End in the menus

I instinctively try to use Home and End in the menus to get to the first and last menu, respectively, but they are not defined, sadly.

I think they would complement the existing navigation options nicely.

RepeatLast should allow to specify whether to do Find or Replace (was Crtl-G default behaviour)

I get bitten by this every once in a while, that Ctrl-G which I want to use for Find Again, after doing a Replace it defaults to Replace Again, which can be quite destructive. If it would default back to the thing you were finding, I could always easily start the replace again with Ctrl-R and arrow-up to the desired term.

It's just that in case of a replace session, some things you say NO to, because you need to check something. Often you want to find the same thing, but you usually don't want to continue replacing straight away again.

Hope this makes sense. Because replace has it's own 'session', I never use Ctrl-G to replace again, in my muscle memory it means: Find Again (I use find way more often than replace).

Allow scripting

It would be very nice to be able to run code validation in open files, like linters.

compile just the executable

Hi!

First of all, thank you for this editor! It is my preferred editor on Linux and Mac.

How to compile just the executable without texinfo?

I saw that it needs it to create the enum.h file

make NE_DEBUG=1

I pulled the fresh sources from here just now, build it with make NE_DEBUG=1 and started editing a document, and this happened:

ne: buffer.c:1285: load_fd_in_buffer: Assertion `(cp)->last_used == (cp)->size - 1 || (cp)->pool[(cp)->last_used + 1] == 0' failed.
Aborted (core dumped)

A normal make gives me a working binary.

backspace acts as delete in xterm and konsole

When "ne" is run in xterm or konsole, pressing the backspace key acts exactly as pressing the delete key, i.e. deletes a character on the right side instead of the left side. In urxvt on the other hand it seems to behave correctly.
I have tried on archlinux and opensuse with the same result.

Backspace does not work on Mac

Hello there,

I love ne and use it as my text editor of choice on my home linux computer. For work, however, I must use a Mac. For whatever reason, despite it being interpreted correctly in every other application, when I press backspace while in ne it interprets it as a delete. The backspace even works correctly when I ssh into the linux server with the same computer, running the same version of ne compiled from the same source.

Anyone run into this problem before? Any advice would be greatly appreciated.

Thanks!

Edit: I previously searched the issues for "mac" and didn't see anything relevant but I know see that issue 10 may be relevant. Looking through the resources provided currently.

32-bit toolchain warnings

First, Thanks much for ne, a real gem! We are cross-compiling under Buildroot with both 32-bit and 64-bit toolchains.

For the 32-bit toolchain case, I get a handful of warnings because sizeof(char *) and sizeof(int64_t) are different.

As far as I can tell, in this use, these warnings can be safely ignored ... please close this issue if you agree. All occurrences of the warnings are here:

/home/dev/astlinux/trunk/output/host/usr/bin/i586-unknown-linux-gnu-gcc  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -pipe -Os  -std=c99 -Wall -Wno-parentheses -D_REGEX_LARGE_OFFSETS -D_GNU_SOURCE -DSTDC_HEADERS -Dinline=__inline__   -O3 -DNDEBUG     -c -o buffer.o buffer.c
buffer.c: In function 'create_mmap_files':
buffer.c:1197:36: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     ld_buffer_syn[ld_count].line = (char *)start_of_line;
                                    ^
buffer.c:1201:39: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
     ld_buffer_no_syn[ld_count].line = (char *)start_of_line;
                                       ^
buffer.c:1231:34: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   ld_buffer_syn[ld_count].line = (char *)start_of_line;
                                  ^
buffer.c:1235:37: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
   ld_buffer_no_syn[ld_count].line = (char *)start_of_line;
                                     ^
buffer.c: In function 'load_fd_mmap':
buffer.c:1275:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      ld->line = ld->line_len ? char_p + (int64_t)ld->line : NULL;
                                         ^
buffer.c:1281:41: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
      ld->line = ld->line_len ? char_p + (int64_t)ld->line : NULL;
                                         ^

IPython Syntax Highlighting

Firstly, thanks to everyone who works on ne. A nice editor for Unix was definitely needed, and ne is really well thought out.

I'm trying to create a syntax recogniser for IPython files (based off the Python one). IPython uses Python syntax, with a few extra features:

  1. If the first visible character on a line is !, the rest of the line is a system command (that will be passed to the underlying shell).
  2. If the first visible character on a line is %, the rest of the line is a 'magic command', a user-defined shell command. For highlighting purposes, they are indistinct from Case 1.
  3. IPython also adds a new assignment statement. The grammar is <name> =! <command...>. The <name> token is a normal Python name, and <command...> is every token to the right of =!, till the end of the line.

It would be nice if Case 1, Case 2 and the <command...> part of Case 3 were highlighted as 'shell syntax', but even just making them all one colour, like a comment, works pretty well in practice.

I tried copying the syntax definition for comment, renaming it command and using "!%" instead of #. This works to an extent. All three cases are all highlighted correctly. The problem, as you probably guessed, is that it breaks highlighting for the regular Python % and != operators (modulo, and not equal). Those operators also now cause the rest of the line to be highlighted as a command.

Feature request: properly support zero-length 'characters'

I've asked about this before, but I thought it would be good to have this on Github.
When editing files with characters that get modified by zero-length characters (like in my case, Thai), those zero-length additions get represented by a ? in ne.

Most common editors have this fixed now (nano, vi) so it seems the external infrastructure is in place. Would you be willing to look into this again?

Docs for Mark appear incorrect

The docs for Mark say "sets the mark at the current position or cancels the previous mark", but that "or cancels the previous mark" suggests what ^k m 0 does.

I think it should be shortened to just say, "sets the mark at the current position".

Also, there's a space at the end of the sentence before the period.

Ran "make install", failed with issue "cp: src/ne: No such file or directory"

I downloaded the zip file for this project, unzipped, and ran make install. The installation failed, here's what is in my terminal. I am running OS X Yosemite with XCode command line tools installed.

$ make install
mkdir -p /usr/local/bin
mkdir -p /usr/local/share/ne/syntax
mkdir -p /usr/local/share/ne/macros
mkdir -p /usr/local/share/man/man1
mkdir -p /usr/local/share/doc/ne
mkdir -p /usr/local/share/info
cp -pf src/ne /usr/local/bin
cp: src/ne: No such file or directory
make: *** [install] Error 1

make install does not build

The INSTALL file indicates that running make install builds and installs, but install has no dependency on build or docs.

Remember syntax highlighter

One needs to always change the syntaxhighlighting of a file without extension, e.g. bash scripts. It would be great if ne could rembember this.

Howto get absolute filepath in macro

Howdy,

Ne is very awsome. I very enjoy the macro capabilities. Is there a way to get the full filepath of the current document in macro to pass it i.e. to an shellscript? I want to save the file with same name but in an different format and extenstion.

A macro to „export my current markdown file to pdf“ without asking for the filename over and over :).
Example
Current filename:
/tmp/test.md
Should be passed to pandoc and saved as
/tmp/test.pdf

For doing dis i want to pass the filename to a shellscript as parameter in „system“.
This would give a huge powerful set of abilitys to scripting

Cheers chrys

The Status Bar does not reach the end of the screen.

Whenever I use the Status Bar, it runs from the left side of the screen up to the last character on the right, but does not include it, so it looks under-scanned. I know I can use Fast GUI to hide it, but I don't like how that changes the menus.

It's a minor gripe, but every time I catch it out the corner of my eye, it makes me think something crazy has happened for a few milliseconds.

Thanks again for ne, and making all of our terminals nicer.

2 nice features

PATCH 1

This patch enables to use bookmarks with the same way as in BRIEF.
It just adds the parameter '?' to the GotoBookmark buildin command.
This parameter just using the request_number() to get the number of the bookmark to go.

src/actions.c:
line ~282

    case SETBOOKMARK_A:
    case GOTOBOOKMARK_A:
        {
            bool relative = false;
            /* *p can be  "", "-", "0".."9", "+1","-1", for which, respectively, */
            /*  c becomes  0, AB,  0 .. 9,  next,prev. Anything else is out of range. */
            if (p) {

                /* patch starts here... */
                /*  now c can be '?'; this asks user for the bookmark number 
                *  (BRIEF compatibility)
                */
                if ( p[0] == '?' ) {
                    c = request_number("Mark", 1);
                    if ( c < 0 || c > 9 )
                        return NUMERIC_ERROR(c);
                    }
                else /* patch ends here... */

                if ((p[0]=='+' || p[0]=='-') && p[1]=='1') {
      ...

Now, in the ~/.ne/.keys, we can use the '?' parameter to ask the bookmark number...
Nice BRIEF's bookmarks :)

# alt+num
KEY 1B1 SetBookmark 1
KEY 1B2 SetBookmark 2
KEY 1B3 SetBookmark 3
KEY 1B4 SetBookmark 4
KEY 1B5 SetBookmark 5
KEY 1B6 SetBookmark 6
KEY 1B7 SetBookmark 7
KEY 1B8 SetBookmark 8
KEY 1B9 SetBookmark 9
KEY 1B0 SetBookmark 0
# alt+j digit [enter]
KEY 1EA GotoBookMark ?

PATCH 2

This patch uses the current text line if there is no selected text (no mark) for
the copy/cut commands. This is a nice feature that exists at BRIEF and NANO text editors.

src/actions.c
line ~1344

    case COPY_A:

        /* patch begins here */
        if ( b->marking == 0 ) { 
            /* there is no mark, use the whole line */
            move_to_sol(b);
            b->mark_is_vertical = 0;
            b->block_start_line = b->cur_line;
            b->block_start_pos = b->cur_pos;
            b->marking = 1;
            if (line_down(b) != OK )
                move_to_eol(b);
            }
        /* patch ends here ... */

        if (!(error = print_error((b->mark_is_vertical ? copy_vert_to_clip : copy_to_clip)(b, c < 0 ? b->o
                ...

Thank you for your nice and good written code.

About screen not scrollable

Would it be feasible for users to scroll down the About screen when the terminal doesn't have enough lines? Maybe just exit it with Esc. (Not sure if you want the same if you start ne without any file arguments...)

Show selected text

When I select a text, I cant see what text is selected.
Reversing the color is an easy good idea.

Flags doc error

In the docs for Flags, it lists the abbrev for ShiftTabs as ST, but it should be SHT.

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.