Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
Vim
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Someone-Else
Vim
Commits
62292587
Commit
62292587
authored
14 years ago
by
Bram Moolenaar
Browse files
Options
Downloads
Patches
Plain Diff
Fix bug: spell menu moved cursor, causing Copy not to work. Spell replacement
didn't work in 'compatible' mode.
parent
9c754c45
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
runtime/doc/todo.txt
+3
-6
3 additions, 6 deletions
runtime/doc/todo.txt
runtime/menu.vim
+8
-4
8 additions, 4 deletions
runtime/menu.vim
runtime/spell/README.txt
+22
-0
22 additions, 0 deletions
runtime/spell/README.txt
with
33 additions
and
10 deletions
runtime/doc/todo.txt
+
3
−
6
View file @
62292587
...
...
@@ -1089,13 +1089,13 @@ Patch to support horizontal scroll wheel in GTK. Untested. (Bjorn Winckler,
Vim 7.3:
- :s messages concatenate (Tony)
- Windows XP: copying only gets first letter of bad spelled word. (Cesar
Romani, 2010 Jul 7)
- in August remove UF_VERSION_CRYPT_PREV and UF_VERSION_PREV.
- Conceal feature: no update when moving to another window. (Dominique Pelle,
2010 Jul 5) Vince will look into it.
Patches to include:
- Make do_do_join() work faster. Could at least do a binary search way of
doing this. Hint from Dominique Pelle, Dec 10; Lee Naish, Dec 11.
Patch from Milan Vancura, 2010 May 16.
- Patch for Lisp support with ECL (Mikael Jansson, 2008 Oct 25)
- Gvimext patch to support wide file names. (Szabolcs Horvat 2008 Sep 10)
- Patch to support netbeans for Mac. (Kazuki Sakamoto, 2009 Jun 25)
...
...
@@ -1133,9 +1133,6 @@ Patches to include:
Docs patch by Dominique Pelle, Mar 25
Update 2009 Mar 28.
Fix for invalid memory access. (Lech Lorens, 2009 Apr 17)
- Make do_do_join() work faster. Could at least do a binary search way of
doing this. Hint from Dominique Pelle, Dec 10; Lee Naish, Dec 11.
Patch from Milan Vancura, 2010 May 16.
- Fix for test29. (Milan Vancura, 2010 May 16)
- Disable setting 'encoding' from a modeline? It usually causes problems,
can't do any good. (Patch from Patrick Texier, 2008 Dec 9)
...
...
This diff is collapsed.
Click to expand it.
runtime/menu.vim
+
8
−
4
View file @
62292587
...
...
@@ -901,7 +901,6 @@ if has("spell")
let
[
w
,
a
]
=
spellbadword
()
if
col
(
'.'
)
>
curcol " don'
t
use word after the
cursor
let
w
=
''
call
cursor
(
0
,
curcol
)
"
put
the
cursor
back where it was
endif
if
w
!=
''
if
a
==
'caps'
...
...
@@ -909,12 +908,13 @@ if has("spell")
else
let
s:suglist
=
spellsuggest
(
w
,
10
)
endif
if
len
(
s:suglist
)
<=
0
call
cursor
(
0
,
curcol
)
"
put
the
cursor
back where it was
else
if
len
(
s:suglist
)
>
0
let
s:changeitem
=
'change\ "'
.
escape
(
w
,
' .'
).
'"\ to'
let
s:fromword
=
w
let
pri
=
1
" set 'cpo' to include the <CR>
let
cpo_save
=
&
cpo
set
cpo
&
vim
for
sug
in
s:suglist
exe
'anoremenu 1.5.'
.
pri
.
' PopUp.'
.
s:changeitem
.
'.'
.
escape
(
sug
,
' .'
)
\
.
' :call <SID>SpellReplace('
.
pri
.
')<CR>'
...
...
@@ -928,12 +928,16 @@ if has("spell")
exe
'anoremenu 1.7 PopUp.'
.
s:ignoreitem
.
' :spellgood! '
.
w
.
'<CR>'
anoremenu
1
.
8
PopUp
.-
SpellSep
-
:
let
&
cpo
=
cpo_save
endif
endif
call
cursor
(
0
,
curcol
)
"
put
the
cursor
back where it was
endfunc
func
!
<
SID
>
SpellReplace
(
n
)
let
l
=
getline
(
'.'
)
" Move the cursor to the start of the word.
call
spellbadword
()
call
setline
(
'.'
,
strpart
(
l
,
0
,
col
(
'.'
)
-
1
)
.
s:suglist
[
a:n
-
1
]
\
.
strpart
(
l
,
col
(
'.'
)
+
len
(
s:fromword
)
-
1
))
endfunc
...
...
This diff is collapsed.
Click to expand it.
runtime/spell/README.txt
+
22
−
0
View file @
62292587
...
...
@@ -22,6 +22,11 @@ patch and running Vim to generate the .spl file. To do this all in one go use
the Aap program (www.a-a-p.org). It's simple to install, it only requires
Python.
Before generating spell files, verify your system has the required locale
support. Source the check_locales.vim script to find out. If something is
missing, see LOCALE below.
You can also do it manually:
1. Fetch the right spell file from:
http://ftp.services.openoffice.org/pub/OpenOffice.org/contrib/dictionaries
...
...
@@ -88,3 +93,20 @@ This procedure should work well:
files and finally move the .new.dic to .orig.dic and .new.aff to .orig.aff.
5. Repeat step 4. regularly.
LOCALE
For proper spell file generation the required locale must be installed.
Otherwise Vim doesn't know what are letters and upper-lower case differences.
Modern systems use UTF-8, but we also generate spell files for 8-bit locales
for users with older systems.
On Ubuntu the default is to only support locales for your own language. To
add others you need to do this:
sudo vim /var/lib/locales/supported.d/local
Add needed lines from /usr/share/i18n/SUPPORTED
sudo dpkg-reconfigure locales
When using the check_locales.vim script, you need to exit Vim and restart it
to pickup the newly installed locales.
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment