Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hebrew on neatvi #1

Closed
yoelion opened this issue Oct 22, 2015 · 15 comments
Closed

Hebrew on neatvi #1

yoelion opened this issue Oct 22, 2015 · 15 comments

Comments

@yoelion
Copy link

yoelion commented Oct 22, 2015

Is neatvi can read Hebrew files? how to set this?

@aligrudi
Copy link
Owner

yoelion notifications@github.com wrote:

Is neatvi can read Hebrew files? how to set this?

I have not tested it but that should be possible:

  1. Define the keymap:
    Add an array like kmap_fa[] in kmap.h; note that the first entry of
    the new array (probably kmap_hb[]) should be the name of the keymap
    (for instance "hb").
  2. Add the new kmap to kmaps[] array in led.c
    (I should probably move it to kmap.h as well).
  3. Change KMAPALT in conf.h to the name of the new keymap ("hb"):
    You can switch between the default keymap ("en") and this keymap with
    ^E and ^F.
  4. You need to specify which regions of text should be rendered R2L:
    dircontext[] in conf.h specifies the direction context of lines (see
    README for the description of td variable; also try zr, zl, zR, and zL
    normal mode commands) and dirmark[] specifies R2L regions. Ideally it
    should be adequate to add UTF-8 Hebrew characters to CR2L macro. You
    can add new rules to dircontext[] and dirmark[] later.

Please report any success.

Ali

@aligrudi
Copy link
Owner

I have simplified the process of adding keymaps, as
explained in README.

@yoelion
Copy link
Author

yoelion commented Oct 30, 2015

@aligrudi
Copy link
Owner

yoelion notifications@github.com wrote:

thanks. but I want to read.
how am I can test files like:
https://github.com/behdad/bicon/blob/master/testtext/kan_zipor
https://notabug.org/tzafrir/geresh/src/master/MANUAL.he

For reading, you can add utf-8 Hebrew characters to CR2L
macro in conf.h. You may want add new rules to dirmarks[]
and dircontexts[] arrays later to customize text rendering.

@yoelion
Copy link
Author

yoelion commented Nov 3, 2015

I don't sure how to add. I'll be happy if you can:

hebrew alefbet: אבגדהוזחטיכךלמםנןסעפצץקרשת
hebrew symbols: ״„”–־₪

I want to understand td -- to call ":td+1" or "td..."
PP about zr, zl, zR, and zL

@aligrudi
Copy link
Owner

aligrudi commented Nov 3, 2015

yoelion notifications@github.com wrote:

I don't sure how to add. I'll be happy if you can:

Please apply this patch and recompile neatvi.

diff --git a/conf.h b/conf.h
index 7a44e27..cd79213 100644
--- a/conf.h
+++ b/conf.h
@@ -65,7 +65,7 @@ static struct highlight {
#define SYN_REVDIR (SYN_BGMK(255))

/* right-to-left characters (used only in dircontexts[] and dirmarks[]) /
-#define CR2L "ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْ"
+#define CR2L "ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْאבגדהוזחטיכךלמםנןסעפצץקרשת״„”–־₪"
/
neutral characters (used only in dircontexts[] and dirmarks[]) /
#define CNEUT "-!"#$%&'()
+,./:;<=>?@^_`{|}~ "

I want to understand td -- to call ":td+1" or "td..."
PP about zr, zl, zR, and zL

You should do ":set td=+1", which is equivalent to zl normal
mode command. Try zr, zl, zR, and zL in normal mode and
see how it changes text direction context (the base direction
of lines). After zL (or zR) all lines are assumed to be in
the left-to-right (or right-to-left) direction. With zl and zr,
the patterns specified in dircontexts[] array specify direction
contexts.

@yoelion
Copy link
Author

yoelion commented Nov 4, 2015

i was trying: sed -i '68c#define CR2L
"ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْאבגדהוזחטיכךלמםנןסעפצץקרשת״„”–־₪"'
conf.h
but neatvi still don't show hebrew

2015-11-03 20:23 GMT+02:00 Ali Gholami Rudi notifications@github.com:

yoelion notifications@github.com wrote:

I don't sure how to add. I'll be happy if you can:

Please apply this patch and recompile neatvi.

diff --git a/conf.h b/conf.h
index 7a44e27..cd79213 100644
--- a/conf.h
+++ b/conf.h
@@ -65,7 +65,7 @@ static struct highlight {
#define SYN_REVDIR (SYN_BGMK(255))

/* right-to-left characters (used only in dircontexts[] and dirmarks[]) /
-#define CR2L "ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْ"
+#define CR2L
"ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْאבגדהוזחטיכךלמםנןסעפצץקרשת״„”–־₪"
/
neutral characters (used only in dircontexts[] and dirmarks[]) /
#define CNEUT "-!"#$%&'()
+,./:;<=>?@^_`{|}~ "

I want to understand td -- to call ":td+1" or "td..."
PP about zr, zl, zR, and zL

You should do ":set td=+1", which is equivalent to zl normal
mode command. Try zr, zl, zR, and zL in normal mode and
see how it changes text direction context (the base direction
of lines). After zL (or zR) all lines are assumed to be in
the left-to-right (or right-to-left) direction. With zl and zr,
the patterns specified in dircontexts[] array specify direction
contexts.


Reply to this email directly or view it on GitHub
#1 (comment).

@yoelion
Copy link
Author

yoelion commented Nov 4, 2015

neatvi don't read HTML & txt files.This is strange because the original vi
can.

2015-11-04 10:39 GMT+02:00 yoel lion yoel3ster@gmail.com:

i was trying: sed -i '68c#define CR2L "ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْאבגדהוזחטיכךלמםנןסעפצץקרשת״„”–־₪"'
conf.h
but neatvi still don't show hebrew

2015-11-03 20:23 GMT+02:00 Ali Gholami Rudi notifications@github.com:

yoelion notifications@github.com wrote:

I don't sure how to add. I'll be happy if you can:

Please apply this patch and recompile neatvi.

diff --git a/conf.h b/conf.h
index 7a44e27..cd79213 100644
--- a/conf.h
+++ b/conf.h
@@ -65,7 +65,7 @@ static struct highlight {
#define SYN_REVDIR (SYN_BGMK(255))

/* right-to-left characters (used only in dircontexts[] and dirmarks[]) /
-#define CR2L
"ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْ"
+#define CR2L
"ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْאבגדהוזחטיכךלמםנןסעפצץקרשת״„”–־₪"
/
neutral characters (used only in dircontexts[] and dirmarks[]) /
#define CNEUT "-!"#$%&'()
+,./:;<=>?@^_`{|}~ "

I want to understand td -- to call ":td+1" or "td..."
PP about zr, zl, zR, and zL

You should do ":set td=+1", which is equivalent to zl normal
mode command. Try zr, zl, zR, and zL in normal mode and
see how it changes text direction context (the base direction
of lines). After zL (or zR) all lines are assumed to be in
the left-to-right (or right-to-left) direction. With zl and zr,
the patterns specified in dircontexts[] array specify direction
contexts.


Reply to this email directly or view it on GitHub
#1 (comment).

@aligrudi
Copy link
Owner

aligrudi commented Nov 4, 2015

yoelion notifications@github.com wrote:

i was trying: sed -i '68c#define CR2L
"ءآأؤإئابةتثجحخدذرزسشصضطظعغـفقكلمنهوىييپچژکگی‌‍؛،»«؟ًٌٍَُِّْאבגדהוזחטיכךלמםנןסעפצץקרשת״„”–־₪"'
conf.h
but neatvi still don't show hebrew

Actually, the unmodified neatvi should show the characters
correctly but in the wrong direction; the patch fixes the
rendering only.

Maybe your terminal (or the font it uses) does not support
Hebrew characters. Can your terminal display these
characters? If not, try a terminal and font combination
that does.

@aligrudi
Copy link
Owner

aligrudi commented Nov 4, 2015

yoelion notifications@github.com wrote:

neatvi don't read HTML & txt files.

Odd. Is there anything special in these files?
For instance, do they start with BOM (used particularly
by Windows applications)?

@yoelion
Copy link
Author

yoelion commented Nov 4, 2015

Sorry. now I understand what is the bug:

if i call to neatvi open file with space in name or path, neatvi will work,
but without any file --

neatvi AUR\ (en)\ -\ neatvi-git.html

neatvi Documents/לימודים/ספרות/יצירות\ פרוזה/yoelion-bidi.txt

2015-11-04 15:31 GMT+02:00 Ali Gholami Rudi notifications@github.com:

yoelion notifications@github.com wrote:

neatvi don't read HTML & txt files.

Odd. Is there anything special in these files?
For instance, do they start with BOM (used particularly
by Windows applications)?


Reply to this email directly or view it on GitHub
#1 (comment).

@aligrudi
Copy link
Owner

aligrudi commented Nov 4, 2015

yoelion notifications@github.com wrote:

Sorry. now I understand what is the bug:

if i call to neatvi open file with space in name or path, neatvi will work,
but without any file --

neatvi AUR\ (en)\ -\ neatvi-git.html

neatvi Documents/לימודים/ספרות/יצירות\ פרוזה/yoelion-bidi.txt

Indeed. I have just fixed it; please try again.

Thanks,
Ali

@yoelion
Copy link
Author

yoelion commented Nov 5, 2015

work.

thanks

@yoelion yoelion closed this as completed Nov 5, 2015
@yoelion yoelion reopened this Nov 5, 2015
@yoelion
Copy link
Author

yoelion commented Nov 5, 2015

how can I to disable white filling within a text (hl?)?

@aligrudi
Copy link
Owner

aligrudi commented Nov 5, 2015

yoelion notifications@github.com wrote:

how can I to disable white filling within a text (hl?)?

The highlighting of reverse text? If so, you may
customize it or disable it by changing the value of
SYN_REVDIR macro in conf.h; changing its value to
0 disables it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants