tihirvon / dex Goto Github PK
View Code? Open in Web Editor NEWDextrous text editor
License: GNU General Public License v2.0
Dextrous text editor
License: GNU General Public License v2.0
I just noticed that dex creates a temporary file when writing changes, which creates quite a lot of noise when using inotify
to monitor a directory. I would like to tell inotifywait
to exclude these temporary files, but the filenames are currently quite hard to match reliably with just a POSIX regexp, since the extension name is a random string. Would it be possible to add something like .tmp
to the filenames, e.g. file.txt.dapQ0O.tmp
instead of just file.txt.dapQ0O
?
For some reason OSX (At least 10.9.4 on my Air) labels the terminfo directories using two character hex instead of a letter. This means that dex is unable to find any terminal entries.
(I managed to work around the issue by creating a symbolic link in the terminfo directory.)
The commands word-fwd -s
, word-bwd -s
, erase-word -s
, etc. currently all skip across newlines. If there were an option to skip "special characters" but not newlines, it would be possible to exactly replicate the behaviour used by most GUI applications (for familiarity/consistency purposes).
The following basic patch seems to work:
diff --git a/move.c b/move.c
index 85492ce..1a7f329 100644
--- a/move.c
+++ b/move.c
@@ -232,7 +232,7 @@ long word_fwd(struct block_iter *bi, bool skip_non_word)
if (!get_current_char_type(bi, &type))
return count;
- if (count && (!skip_non_word || type == CT_WORD))
+ if (count && (!skip_non_word || type == CT_WORD || type == CT_NEWLINE))
return count;
count += skip_fwd_char_type(bi, type);
Would you be willing to accept a more complete patch for this if it was implemented as an optional flag?
Maybe it's time to 1.0.1 or 1.1 version? :)
A number of editors have the home key or BOL command move the cursor to the first non-whitespace character in a line if the cursor was anywhere other than that position, and to the actual beginning of the line if it was already at that position. As such one press will generally be at the beginning of text and two at the beginning of the line.
Is there a chance we could have this in Dex?
In nano, pressing ^K
in more than once, without moving the cursor, appends extra lines to the clipboard. This means that it's relatively simple to cut (or copy) multiple lines of code. Is there an equivalent in Dex? ^D
and ^Y
don't seem to do it.
Hi, I maintain your package in the Arch Linux AUR as https://aur.archlinux.org/packages/dex-editor-git/. Recently, I came to know that there is a package named dex in the Arch Community repository as well: https://www.archlinux.org/packages/community/any/dex/
Some of the files of both the packages conflict resulting in making a person unable to have both packages installed simultaneously.
I have no option but to rename the binary at install time, so I thought it would be better if it is done upstream. What are your thoughts on the same?
I'm not sure exactly what the problem is, but certain UTF-8 characters cause the editor to behave strangely. A simple way to reproduce the problem is to insert สี
at the beginning of a line, then add a few ASCII characters to the right, move into the middle of those character and press backspace a few times. This deletes the character 1 to the left of the expected character. An extra space also appears at the end of the line that was never inserted.
For each extra สี
added to the beginning of the line, the backsapce offset moves 1 to the left and 1 more mysterious space is added at the end of the line.
I guess this is an error calculating display width somewhere. The example character I used above is a 3 byte character (ส
; UCS4: U+0E2A
; UTF-8: 0xE0 0xB8 0xAA
), followed by a 3 byte combining character (UCS4: U+0E35
; UTF-8: 0xE0 0xB8 0xB5
), that together should occupy 1 column.
Hoping this is a bug that will be easy to fix:
When opening this UTF-8 sample file in dex and going with the cursor to the end of each line,
the cursor lines up with the end of the displayed characters, except in case of the Thai fonts (line 123-130). There the cursor is displayed way past the end of the characters.
dexterous?
dextrous?
😆
Fedora users now can install it via: yum install dex
[https://bugzilla.redhat.com/show_bug.cgi?id=1084776]
Hi. Would it be reasonable to add a -q
option to the close
command to allow exiting when the last buffer is closed? Would you be willing to merge such a patch if I submitted one?
I can't get a few bindings to work. See list below. Is this an issue on my end or are they just not supported?
# does nothing:
C-/ ^/
# prints char as if ctrl wasn't pressed
C-\; ^\; C-. ^. C-tab ^tab
If the "paste" command had an optional -c parameter, it would be possible to paste at the cursor position.
What I am trying to do is to paste something (insert it) at the top of the file, other than a work-around, it can't be done, and the work-around doesn't work when you're trying to use it to paste at the end of the file.
I seem to have found a piece of code that causes the tag
command to always crash with a segfault.
Steps to reproduce:
git clone git://git.netsurf-browser.org/libdom.git
cd libdom
ctags -R
dex -c 'line 344' bindings/hubbub/parser.c
tag
command on dom_node_remove_child
A gdb backtrace
produces:
#0 __strcmp_ssse3 () at ../sysdeps/x86_64/strcmp.S:210
#1 0x000000000040efb7 in streq (b=<optimized out>, a=<optimized out>)
at common.h:44
#2 xstreq (b=<optimized out>, a=<optimized out>) at common.h:55
#3 file_location_equals (a=0x66a850, b=0x677640) at file-location.c:36
#4 0x0000000000414ff7 in message_equals (b=0x677550, a=0x677670) at msg.c:29
#5 is_duplicate (m=0x677670) at msg.c:37
#6 add_message (m=m@entry=0x677670) at msg.c:53
#7 0x0000000000406b30 in cmd_tag (pf=<optimized out>, args=<optimized out>)
at commands.c:1257
#8 0x0000000000418701 in run_command (av=0x66ace0, cmds=0x422b60 <commands>)
at run.c:99
#9 run_commands (cmds=cmds@entry=0x422b60 <commands>,
array=array@entry=0x7fffffffdf90) at run.c:116
#10 0x00000000004188cc in handle_command (cmds=0x422b60 <commands>,
cmd=<optimized out>) at run.c:134
#11 0x000000000040301e in handle_binding (type=type@entry=KEY_SPECIAL,
key=key@entry=10) at bind.c:195
#12 0x00000000004152b9 in normal_mode_keypress (type=KEY_SPECIAL, key=10)
at normal-mode.c:56
#13 0x000000000040deb0 in main_loop () at editor.c:420
#14 0x000000000040258a in main (argc=<optimized out>, argv=<optimized out>)
at main.c:232
I'm running Fedora 20 on x86_64 with dex built via this RPM spec file. Any ideas what could be causing it? I must have used the tag
command on at least a few hundred other symbols and it's never crashed until now.
Hi. I'm trying to write a dex syntax file for Lua, but I'm having some trouble handling long brackets.
I've tried the following syntax file:
syntax .lua-longstring
state start
char \] endpre
eat start
state endpre
heredocend end
eat start
state end
char \] END
eat start
syntax lua
state code
char \[ bracket
eat code
state bracket
char -b = longbracket
eat code
state longbracket
char -b = longbracket
char -n \[ code error
heredocbegin .lua-longstring code
but it just produces the error:
/home/craig/.dex/syntax/lua:29: No default action in state longbracket
According to man dex-syntax
, heredocbegin
is a valid default action, but no matter what I try, I can't get dex to accept it.
Is this a bug or am I just doing something wrong here?
I've been using Python syntax highlighting, but C/C++ seems to have this issue as well.
When a floating point literal such as 132.02598 is typed, the syntax highlighter mistakes the part after the decimal point with the leading zero for an octal number. Since 9 and 8 are invalid in octal literals, they then get highlighted with the error color, even though this is actually just a single float.
(Also, it looks like it does this for exponential notation floats like 10E-8 or 10.0e4).
Perl is still a commonly used language, especially in the *nix community of which I presume makes up most of the dex userbase. I'd like to see some pretty colors in my .pl files.
Fantastic editor, great potential!
I would like to do a replace without having to go into command mode, like is possible in search mode. I was wondering if, instead of creating new modes, this could be worked around by having an "input" command, or some sort of parameter substitution, so that I could bind a key to "replace ^input ^input". This would also make other things possible.
Good day.
I want to add dex
into homebrew packages, so the question is - can you tag a stable release?
Maybe with version 0.1.0 or even 1.0.0 (guess 1800+ commits are enough for it).
Thanks.
In very many editor, e.g. emacs, nano, exist following spec:
aaaaaaaa
|abcdabcd
bbbbbb
aaaaaaaa
|
bbbbbbb
aaaaaaaaa
|bbbbbbbbb
In current version, the second step we have to use cmd_delete
to do same things
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.