Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm writing my doctoral dissertation using vim and LaTeX, and I spell-check the document using aspell. Sometimes I run across an error that can't suitably be fixed using the built-in spell-check options in aspell. For example the last time I ran into a spell check problem on a repeated word. In addition to fixing the spelling error, I also had to delete on occurence of the word, but aspell didn't give me a way to do that.

Is there a way to drop into my editor at the point where aspell finds an error, in order to do more extensive fixes there?

share|improve this question
add comment

2 Answers

It's usually a lot easier to run aspell from within your editor rather than trying to invoke an editor based on aspell's output. Instructions for this can be found in the aspell manual section dealing with use with other applications. I prefer emacs, but there are instructions for emacs, lyx, vim, and pine.

share|improve this answer
    
This doesn't do what I want, which is to be able to interrupt the spell check process in the middle, fix something that's just a little bit beyond what aspell's interface lets me fix, and then continue spell checking where I left off. –  Ken Bloom Jun 23 '11 at 2:35
    
emacs' use of aspell does just this. It finds each misspelling, suggests a set of corrections or you can enter your own, and then it continues on to the next. I looked at the aspell documentation, and there are no editor escapes that I could find, so I wish you well on your search. –  Mark Mann Jun 23 '11 at 5:53
    
emacs' aspell integration is totally different than vim's. If you look at the instructions, all vim's aspell is doing is shelling out to the aspell binary and running it in the console. That's not much integration at all. –  Ken Bloom Jun 23 '11 at 10:19
    
@Ken Bloom:I second the recommendation of using aspell from within emacs. It works well. However, as far as I know, the emacs process that runs aspell does expect to spellcheck the whole document by default, and only saves all the changes at the end. If you interrupt it, it doesn't save anything. It may be possible to change this behavior. –  Faheem Mitha Jun 23 '11 at 15:10
add comment

Will Control-z work? You'll have to scroll down whenever you find an error, but your editor's search function should help you out there.

Like so:

aspell thesis.tex
# ... working...
^Z
vim thesis.tex
# ... working...
fg  aspell
share|improve this answer
    
It appears that aspell operates by loading the entire file into memory, making changes in memory, and then writing the whole file back when it finishes, relegating any modifications to the .bak file. I guess I could merge the changes afterwards, especially since I keep the thesis in git anyway. –  Ken Bloom Jun 23 '11 at 10:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.