Vim by Applidium (GitHub: applidium / Vim, License: Vim) is an open source Vim port for iOS. I realise that might sound impractical, but Vim's modal nature means it can actually work fairly well with touchscreen keyboards. It's not the ideal interface, but it's at least possible to reuse some of your hard-won Vim skills in a mobile context.
If you're a heavy Android/iOS user like me, then you'll already have at least one SSH client installed. Therefore you've probably already used Vim with your mobile device. This native port, however, means files can be edited locally.
Actually getting files into iOS apps is still awkward -- I couldn't find any iCloud functionality in this app, but it does have the iTunes-based interface where files can be uploaded to the device. To use it, navigate to iTunes, Devices/iPhone, Apps, then select the Vim icon and use the 'Vim Documents' interface to manage files.
The cursor can be moved with the touchscreen, and double-tapping will make a selection. The two finger gesture will scroll the window. I tried this with a fairly long file and it performed well.
~/.vimrc will be read on launch. I added
syn on to it, and it enabled syntax highlighting as expected.
Tabs work, and so does creating spit windows. I've been using
:split because I can't figure out how to type
<Ctrl> at the moment, however I did notice that tapping a window will give it focus which is useful.
The above screenshots show Vim running on a retina display with antialiasing turned off, which is the default. It can be turned on with
:set antialias, but it looks blurry.
Fonts can be changed with commands in this format:
:set guifont=Courier:h16. It looks a bit better with larger fonts and AA turned on.
:q actually works, which is weird because Apple's documentation recommends against allowing applications to quit.
Forking isn't supported due to iOS constraints, so external programs like grep won't work. I haven't figured out how to make arrow keys work when using a bluetooth keyboard, and I'm still baffled by how to type
<Tab> on the iOS keyboard.
The escape key isn't mapped -- instead it's mapped to
\. This is on the second symbol keyboard in iOS which is a little bit awkward to get to. One tip I read suggests remapping it using
:imap al <Esc> -- this means the
al keys have to be pressed simultaneously.
I found the app worked fairly well with a bluetooth keyboard, but the escape key doesn't work with a physical keyboard either. I couldn't find a way to force it to work.
Bram Moolenaar mentioned the Vim iOS app on the vim-mac mailing list, and there's a Hacker News thread as well. Since then it hasn't been updated, but it has got a fair amount of attention and feedback from the Vim community.
I'd hope to see the authors (or contributors) embrace more iOS-specific features like iCloud, but also use a cleaner-looking font and allow gestures to be used as metakeys.