Vim "by far the best editor on the iPad"

795 views
Skip to first unread message

Eric Weir

unread,
Apr 1, 2019, 11:29:11 AM4/1/19
to vim...@googlegroups.com

> On Apr 1, 2019, at 5:04 AM, David Demelier <mar...@malikania.fr> wrote:
>
> The longer backstory is that I recently returned to using Vim as a programming editor, when I was left without a computer and it was by far the best editor on the iPad.

Haven’t been here in a good while. Got comfortable with my Vim setup and didn't need so much help. (I’m a writer, not a programmer.) Then retired and have not been using Vim much.

I was very surprised to see this. I tried the only Vim app available for iPad around the time I got my first iPad. I quickly abandoned it. On reading the above I checked out the iVim version in the App Store, saw uniform high praise in the comments, and installed it. It's gonna take me awhile to refresh my Vim competency—such as it was, though adequate for my needs—but I’m glad to have access to it again.

I understand it’s not possible to install Vim plugins under iOS. Disappoints me, as I made use of several in my configuration. Is it even possible to set up a .vimrc?

Would appreciate hearing about others experiences with Vim on the iPad.

----------------------------------------
Eric Weir
Decatur, GA USA
eew...@bellsouth.net

"What does it mean...that the world is so beautiful?"

- Mary Oliver


Peter King

unread,
Apr 1, 2019, 11:58:02 AM4/1/19
to vim...@googlegroups.com
On Mon, Apr 01, 2019 at 11:28:57AM -0400, Eric Weir wrote:

> Would appreciate hearing about others experiences with Vim on the iPad.

I occasionally use iVim on the iPad itself, which is good implementation of
vim (though with some limitations as you note) -- but I found that far and
away to best way to use vim on the iPad is to ssh/mosh in to a Real Computer
and run it there, as a command-line program. I use Blink as the app on the
iPad I use to connect; the implementation of mosh is pretty robust and the
terminal they provide handles anything I throw at it. In the past I've
used Termius. Anyway, with that setup I have my full native (neo)vim with
all plugins, configuration, etc. running; it's the best setup for the iPad
I've found.

(Under Android it's possible to get to the heavily-modded Linux core shell,
and install vim there, for instance using Debian package management -- but
you can't do that on iOS.)

--
Peter King peter...@utoronto.ca
Department of Philosophy
170 St. George Street #521
The University of Toronto (416)-946-3170 ofc
Toronto, ON M5R 2M8
CANADA

http://individual.utoronto.ca/pking/

=========================================================================
GPG keyID 0x7587EC42 (2B14 A355 46BC 2A16 D0BC 36F5 1FE6 D32A 7587 EC42)
gpg --keyserver pgp.mit.edu --recv-keys 7587EC42
signature.asc

Bob Pepin

unread,
Apr 1, 2019, 2:13:46 PM4/1/19
to vim...@googlegroups.com

> On 1 Apr 2019, at 17.57, Peter King <peter...@utoronto.ca> wrote:
>
>> On Mon, Apr 01, 2019 at 11:28:57AM -0400, Eric Weir wrote:
>>
>> Would appreciate hearing about others experiences with Vim on the iPad.
>
> I occasionally use iVim on the iPad itself, which is good implementation of
> vim (though with some limitations as you note) -- but I found that far and
> away to best way to use vim on the iPad is to ssh/mosh in to a Real Computer
> and run it there, as a command-line program. I use Blink as the app on the
> iPad I use to connect;

I remember downloading a Python plugin using a plugin manager under iVim, and putting it into the vimrc. On iOS each app has their own private file system, and for iVim it mostly works the same as on other OSes. I used a setup with Dropbox mounted on a cloud machine, together with the iVim features for opening files from iFiles and the iFiles Dropbox integration. It worked reasonably well for running some reinforcement learning experiments in Python.
I found the biggest problem to be the speed of typing with the onscreen keyboard, which is why predictive input for iVim is on my todo list. Also lack of smooth scrolling by dragging up and down like in most iOS apps, as well as lack of “touchpad” support (where you move the cursor by dragging 2 fingers over the onscreen keyboard).
I also remember briefly trying the Blink/mosh solution, and it had similar usability issues.

Eric Weir

unread,
Apr 3, 2019, 12:33:30 PM4/3/19
to vim_use

> On Apr 1, 2019, at 11:57 AM, Peter King <peter...@utoronto.ca> wrote:
>
> On Mon, Apr 01, 2019 at 11:28:57AM -0400, Eric Weir wrote:
>
>> Would appreciate hearing about others experiences with Vim on the iPad.
>
> I occasionally use iVim on the iPad itself, which is good implementation of
> vim (though with some limitations as you note) -- but I found that far and
> away to best way to use vim on the iPad is to ssh/mosh in to a Real Computer
> and run it there, as a command-line program. I use Blink as the app on the
> iPad I use to connect; the implementation of mosh is pretty robust and the
> terminal they provide handles anything I throw at it. In the past I've
> used Termius. Anyway, with that setup I have my full native (neo)vim with
> all plugins, configuration, etc. running; it's the best setup for the iPad
> I've found.

I did a bit of poking around on the web about how I might go about this. Still largely foreign territory for me. An initial question was whether my MacBook Air could be the “real computer” that I would log into. I’ve resolved that question. Only one specific question at this point: How do you deal with the absence of an escape key on an iPad in this approach. Confident that there will be other questions, but I’ll wait for them to get clear. Meantime I’ll keep poking around, maybe trying to try some things.

> (Under Android it's possible to get to the heavily-modded Linux core shell,
> and install vim there, for in

After I determined that the then only available Vim app for iPad was not going to work, I bought a small Android tablet and was able to set up a vim implementation that was identical to the one on my MacBook. Ultimately I decided my MacBook Air was likely to be my best Vim machine and sold the Android tablet.

------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eew...@bellsouth.net

"(I)t is important that awake people be awake... the darkness around us is deep."

- William Stafford

Eric Weir

unread,
Apr 3, 2019, 12:42:09 PM4/3/19
to vim_use

> On Apr 1, 2019, at 2:13 PM, Bob Pepin <b...@pepin.io> wrote:
>
> I remember downloading a Python plugin using a plugin manager under iVim, and putting it into the vimrc. On iOS each app has their own private file system, and for iVim it mostly works the same as on other OSes. I used a setup with Dropbox mounted on a cloud machine, together with the iVim features for opening files from iFiles and the iFiles Dropbox integration. It worked reasonably well for running some reinforcement learning experiments in Python.

I’d like to learn more about this. In particular about the plugin manager used under Ivim. By iFiles do you mean iOS's Files app. I’ve made almost no use of that on my iPad. Do I understand it is accessible in iVim? Likewise iCloud? And via iCloud Dropbox?

------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eew...@bellsouth.net

Bob Pepin

unread,
Apr 3, 2019, 2:21:27 PM4/3/19
to vim...@googlegroups.com

> On 3 Apr 2019, at 18.41, Eric Weir <eew...@bellsouth.net> wrote:
>
> I’d like to learn more about this. In particular about the plugin manager used under Ivim. By iFiles do you mean iOS's Files app. I’ve made almost no use of that on my iPad. Do I understand it is accessible in iVim? Likewise iCloud? And via iCloud Dropbox?
>
I just had a look at my iVim config, seems I remembered wrong about the plugin manager. But in principle the only thing missing is curl, so if you find a way to transfer the plugin files to the iPad things should work.
For iVim <-> Files <-> Dropbox have a look at :help ios-share.

Eric Weir

unread,
Apr 3, 2019, 2:26:12 PM4/3/19
to vim_use
Thanks, Bob. I’ll check it out.

Peter King

unread,
Apr 3, 2019, 4:56:23 PM4/3/19
to vim...@googlegroups.com
On Wed, Apr 03, 2019 at 12:33:15PM -0400, Eric Weir wrote:

> I did a bit of poking around on the web about how I might go about this.
> Still largely foreign territory for me. An initial question was whether
> my MacBook Air could be the “real computer” that I would log into. I’ve
> resolved that question. Only one specific question at this point: How do
> you deal with the absence of an escape key on an iPad in this approach.
> Confident that there will be other questions, but I’ll wait for them to
> get clear. Meantime I’ll keep poking around, maybe trying to try some
> things.

I use an external keyboard which has an Esc key -- a Logitech K810
bluetooth keyboard which is very satisfactory for the purpose. That
plus a stand that will allow me to set the iPad up either vertically
or horizontally (usually the former but the latter when I need to run
something side-by-side with vim) works well for me. In essence the
iPad is being treated as a dumb terminal, so where I run vim I also have
all my other files and programs available. Of course, I'm old enough to
have been raised on server/client mainframe computing, so to me this seems
perfectly natural.
signature.asc

Eric Weir

unread,
May 18, 2019, 2:18:05 PM5/18/19
to vim_use

> On Apr 3, 2019, at 4:56 PM, Peter King <peter...@utoronto.ca> wrote:
>
> On Wed, Apr 03, 2019 at 12:33:15PM -0400, Eric Weir wrote:
>
>> I did a bit of poking around on the web about how I might go about this.
>> Still largely foreign territory for me. An initial question was whether
>> my MacBook Air could be the “real computer” that I would log into. I’ve
>> resolved that question. Only one specific question at this point: How do
>> you deal with the absence of an escape key on an iPad in this approach.
>> Confident that there will be other questions, but I’ll wait for them to
>> get clear. Meantime I’ll keep poking around, maybe trying to try some
>> things.
>
> I use an external keyboard which has an Esc key -- a Logitech K810
> bluetooth keyboard which is very satisfactory for the purpose. That
> plus a stand that will allow me to set the iPad up either vertically
> or horizontally (usually the former but the latter when I need to run
> something side-by-side with vim) works well for me. In essence the
> iPad is being treated as a dumb terminal, so where I run vim I also have
> all my other files and programs available. Of course, I'm old enough to
> have been raised on server/client mainframe computing, so to me this seems
> perfectly natural.

It’s been a while since I first posted on this thread. In the interval the only thing I’ve done is some very tentative exploration of moving files between iVim and Dropbox and folders in the Files app on the iPad.

Two solutions to using Vim under iOS were recommended in response to my original post: logging onto a “real computer” with Blink/Mosh/SSH and running the Vim installation on the remote computer; running Vim directly on an iPad within the constraints of the iVim app.

I have no experience related to the first option. I sense the learning curve would be steep. I take it I could log into the MacBook on which my configuration of Vim is installed. Could I do that at any distance from the MacBook, say like 1000 miles?

Lotsa questions about running Vim on an iPad within the constraints of iOS/iVim. For starters, just two: Is it possible to create folders in the iVim sandbox, e.g., in the .vim folder? Where is the .vimrc?

As I indicated in my initial post, I’ve largely been away from Vim for a few years. Lotsa things have become Greek to me that once we’re not. Help Appreciated.

Eric Weir

unread,
May 21, 2019, 2:30:26 PM5/21/19
to vim_use
Help. 😮

Eric Weir

unread,
May 21, 2019, 3:14:12 PM5/21/19
to vim_use

> On May 18, 2019, at 2:17 PM, Eric Weir <eew...@bellsouth.net> wrote:
>
> As I indicated in my initial post, I’ve largely been away from Vim for a few years. Lotsa things have become Greek to me that once we’re not. Help Appreciated.

When I do :vimtutor in iVim on my iPad or in MacVim on my MacBook I get “not an editor command.” Anyone have any ideas about why?

------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eew...@bellsouth.net

"Imagining the other is a powerful antidote to fanaticism and hatred."

- Amos Oz

Bram Moolenaar

unread,
May 21, 2019, 3:19:20 PM5/21/19
to vim...@googlegroups.com, Eric Weir

Eric Weir wrote:

> > On May 18, 2019, at 2:17 PM, Eric Weir <eew...@bellsouth.net> wrote:
> >
> > As I indicated in my initial post, I’ve largely been away from Vim for a few years. Lotsa things have become Greek to me that once we’re not. Help Appreciated.
>
> When I do :vimtutor in iVim on my iPad or in MacVim on my MacBook I
> get “not an editor command.” Anyone have any ideas about why?

It is a shell command, not a command to use inside Vim.

% vimtutor

--
hundred-and-one symptoms of being an internet addict:
5. You find yourself brainstorming for new subjects to search.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Eric Weir

unread,
May 21, 2019, 4:26:22 PM5/21/19
to Bram Moolenaar, vim_use

> On May 21, 2019, at 3:19 PM, Bram Moolenaar <Br...@moolenaar.net> wrote:
>
>>
>> When I do :vimtutor in iVim on my iPad or in MacVim on my MacBook I
>> get “not an editor command.” Anyone have any ideas about why?
>
> It is a shell command, not a command to use inside Vim.
>
> % vimtutor

Thanks.

------------------------------------------------------------------------------------------
Eric Weir
Decatur, GA USA
eew...@bellsouth.net

Lifepillar

unread,
May 21, 2019, 6:07:18 PM5/21/19
to 'Lifepillar' via vim_use, eew...@bellsouth.net
On 18 May 2019, at 20:17, Eric Weir <eew...@bellsouth.net> wrote:
>
>
> Lotsa questions about running Vim on an iPad within the constraints of iOS/iVim. For starters, just two: Is it possible to create folders in the iVim sandbox, e.g., in the .vim folder?

Yes. You can do it with netrw:

:edit .
d
Type directory name

You may get an error, but the directory is created. Anyway, much easier is to copy your .vim folder from your Mac using iTunes. For more about moving files into and from iVim, see `:help ios-share`. For iOS-specific information, see `:help ios`. You may long-tap with one finger to hide/show the extended keys above the keyboard and long-tap with two fingers to hide the keyboard (type with one finger to show it again): this will make more room for reading. Use two fingers to scroll.

For plugins, pure VimScript plugins should generally work (but keep in mind that iVim is based on Vim 7.4). If a plugin requires Python, Perl or Ruby then you’re out of luck.

> Where is the .vimrc?

In /private/var/mobile/Containers/Data/Application/APP-ID/Documents. Use :lcd to see the full path.
You may access your sandboxed directory with netrw as above:

:edit .
:Rex (to exit netrw)

See :help netrw for more information (only a subset of netrw functionality is working in iVim).

Life.

Eric Weir

unread,
May 22, 2019, 11:41:23 AM5/22/19
to vim_use

> On May 21, 2019, at 6:07 PM, 'Lifepillar' via vim_use <vim...@googlegroups.com> wrote:
>
> On 18 May 2019, at 20:17, Eric Weir <eew...@bellsouth.net> wrote:
>>
>> Lotsa questions about running Vim on an iPad within the constraints of iOS/iVim. For starters, just two: Is it possible to create folders in the iVim sandbox, e.g., in the .vim folder?
>
> Yes. You can do it with netrw:
>
> :edit .
> d
> Type directory name
>
> You may get an error, but the directory is created. Anyway, much easier is to copy your .vim folder from your Mac using iTunes. For more about moving files into and from iVim, see `:help ios-share`. For iOS-specific information, see `:help ios`. You may long-tap with one finger to hide/show the extended keys above the keyboard and long-tap with two fingers to hide the keyboard (type with one finger to show it again): this will make more room for reading. Use two fingers to scroll.

Thanks much for the response.

I succeeded in creating a new folder. When I try to delete it I get “unable to remove directory….” and “Cannot make changes, ‘modifiable’ is off” I was able to rename it, though.

Wow! Copy the entire .vim folder to the iPad? I had assumed much of would be incompatible, that I’d have to recreate my setup piecemeal, one step at a time. E.g., I have vundle installed. It requires git. I gather there are a number of git apps for iOS. If I have one installed will sandboxing of apps allow vim to access git when I run vundle?

>> Where is the .vimrc?
>
> In /private/var/mobile/Containers/Data/Application/APP-ID/Documents. Use :lcd to see the full path.
> You may access your sandboxed directory with netrw as above:
>
> :edit .
> :Rex (to exit netrw)
>
> See :help netrw for more information (only a subset of netrw functionality is working in iVim).

When I do :Rex nothing happens.

Does iVim have a default .vimrc? Or do I have to create it? If the former I don’t find it.

I know I’m being I’m being really dense. I’ve been away from vim a good while. It will start coming back. Meantime, I appreciate the help.
Reply all
Reply to author
Forward
0 new messages