Git Product home page Git Product logo

applidium / vim Goto Github PK

View Code? Open in Web Editor NEW
534.0 48.0 100.0 126.27 MB

Port of the Vim text editor to the iOS

Home Page: https://applidium.com/en

Shell 0.15% Objective-C 0.71% Vim Script 45.59% C 47.27% Awk 0.08% Perl 0.26% Emacs Lisp 0.13% Ruby 0.17% C++ 1.22% Python 0.10% IDL 0.01% Makefile 1.67% NSIS 0.07% Roff 1.79% Batchfile 0.03% PostScript 0.27% Smalltalk 0.11% JavaScript 0.12% NewLisp 0.16% SystemVerilog 0.12%

vim's Introduction

README.md for version 8.1 of Vim: Vi IMproved.

Build Status Coverage Status Coverage Status Appveyor Build status Coverity Scan Debian CI

What is Vim?

Vim is a greatly improved version of the good old UNIX editor Vi. Many new features have been added: multi-level undo, syntax highlighting, command line history, on-line help, spell checking, filename completion, block operations, script language, etc. There is also a Graphical User Interface (GUI) available. Still, Vi compatibility is maintained, those who have Vi "in the fingers" will feel at home. See runtime/doc/vi_diff.txt for differences with Vi.

This editor is very useful for editing programs and other plain text files. All commands are given with normal keyboard characters, so those who can type with ten fingers can work very fast. Additionally, function keys can be mapped to commands by the user, and the mouse can be used.

Vim runs under MS-Windows (NT, 2000, XP, Vista, 7, 8, 10), Macintosh, VMS and almost all flavours of UNIX. Porting to other systems should not be very difficult. Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me, Amiga DOS, Atari MiNT, BeOS, RISC OS and OS/2. These are no longer maintained.

Distribution

You can often use your favorite package manager to install Vim. On Mac and Linux a small version of Vim is pre-installed, you still need to install Vim if you want more features.

There are separate distributions for Unix, PC, Amiga and some other systems. This README.md file comes with the runtime archive. It includes the documentation, syntax files and other files that are used at runtime. To run Vim you must get either one of the binary archives or a source archive. Which one you need depends on the system you want to run it on and whether you want or must compile it yourself. Check http://www.vim.org/download.php for an overview of currently available distributions.

Some popular places to get the latest Vim:

Compiling

If you obtained a binary distribution you don't need to compile Vim. If you obtained a source distribution, all the stuff for compiling Vim is in the src directory. See src/INSTALL for instructions.

Installation

See one of these files for system-specific instructions. Either in the READMEdir directory (in the repository) or the top directory (if you unpack an archive):

README_ami.txt		Amiga
README_unix.txt		Unix
README_dos.txt		MS-DOS and MS-Windows
README_mac.txt		Macintosh
README_vms.txt		VMS

There are other README_*.txt files, depending on the distribution you used.

Documentation

The Vim tutor is a one hour training course for beginners. Often it can be started as vimtutor. See :help tutor for more information.

The best is to use :help in Vim. If you don't have an executable yet, read runtime/doc/help.txt. It contains pointers to the other documentation files. The User Manual reads like a book and is recommended to learn to use Vim. See :help user-manual.

Copying

Vim is Charityware. You can use and copy it as much as you like, but you are encouraged to make a donation to help orphans in Uganda. Please read the file runtime/doc/uganda.txt for details (do :help uganda inside Vim).

Summary of the license: There are no restrictions on using or distributing an unmodified copy of Vim. Parts of Vim may also be distributed, but the license text must always be included. For modified versions a few restrictions apply. The license is GPL compatible, you may compile Vim with GPL libraries and distribute it.

Sponsoring

Fixing bugs and adding new features takes a lot of time and effort. To show your appreciation for the work and motivate Bram and others to continue working on Vim please send a donation.

Since Bram is back to a paid job the money will now be used to help children in Uganda. See runtime/doc/uganda.txt. But at the same time donations increase Bram's motivation to keep working on Vim!

For the most recent information about sponsoring look on the Vim web site: http://www.vim.org/sponsor/

Contributing

If you would like to help making Vim better, see the CONTRIBUTING.md file.

Information

The latest news about Vim can be found on the Vim home page: http://www.vim.org/

If you have problems, have a look at the Vim documentation or tips: http://www.vim.org/docs.php http://vim.wikia.com/wiki/Vim_Tips_Wiki

If you still have problems or any other questions, use one of the mailing lists to discuss them with Vim users and developers: http://www.vim.org/maillist.php

If nothing else works, report bugs directly: Bram Moolenaar [email protected]

Main author

Send any other comments, patches, flowers and suggestions to: Bram Moolenaar [email protected]

vim's People

Contributors

au-phiware avatar brammool avatar laviallb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vim's Issues

Release updated version on app store

The current version on the app store seems more like a proof of concept. There are now forks that have significant improvements and are actually usable. Would it be feasible to update the official app with one of these forks, with regular (automatic) releases to keep up to date with the upcoming iOS11 changes?

See larki/VimIOS#7

map <cr> not working

Netrw uses nnoremap ...
to select files and open directories. I've tested some maps; they do appear to work, but this one doesn't.

The ipad vim app does have netrw included (try :e . to see). Pressing the while atop a file or directory should open it, but isn't.

high ascii character bug

high ascii character bug

Prepare to see the characters:
:set enc=utf-8

Enter some high ascii characters, it is easy, for à hold down the a key until you see other characters, then slide your finger to the desired character.

àèìòù
äëïöü

Move cursor up down left right to see characters disappear

I found this when I mapped:

ino
im à

Easier for me to press, hold, and slide on the a key than to go 2 levels deep for the key to do escape.

Bill

space space

ios6 iphone 3gs and 5 with vim using on screen keyboard

Insert or normal mode.

Typing a space after a space.
The first space will insert a space.
The second space will insert the character above the portion of the spacebar touched.

Fonts or text are mangled and mostly unreadable

The default font is difficult to read as it appears to be mangled, 'corrupted', or otherwise simply rendering poorly. I just installed the latest version of the app. I'm running iOS 9.3.2.

Development Plans?

Are there plans to improve this app and push improved versions to the App Store? I ask not to nag or complain, but just out of sincere interest in the status of the project.

If not, is someone interested in forking the project, improving it, and pushing the improved version (with a different name, I assume) to the App Store? Or forking the project, removing the restrictions imposed by the App Store (e.g., provide access to cli tools, python and ruby support, console version of vim, etc.), and providing a version via Cydia?

I'd take on such challenges myself, but I lack the time and expertise.

High-Ascii lost in right-left overrun

With VIM in the iPad, running IOS 7.0.2

set enc=utf-8
set tenc=utf-8
set fenc=latin-1
set fencs=latin-1

In insert mode: most things work as expected, when I'm writing "normal text" using the 28 characters of our Swedish alphabet (that is as the English alphabet + 3 more characters; a-ring, a-umlaut and o-umlaut, sorted in that order after z of in the uk/us...)

Back in visual mode, when I move leftwards (using h-key) over a word with one of the 3 high letters, the character after that high one will be replaced by a space. When moving back towards right (using l-key), the lost (hidden) character will come back to be seen.

I guess this has something to do with the 2-byte character representation of "non-ASCII" characters that comes with "enc=utf-8".

Best regards, someone very happy with this fine tool,
/Göran Åhling

Does vimtutor work

I would love to use this as way to work through the vimtutor while traveling but I can't figure out how to run it with this build. I see related files in the git repo but I don't see a way to get at them from inside the app. I'm guessing it's probably not possible but if it is I would love some advice on how to run it.

2 finger tap is easier than blackslash for input esc

To input blackslash in iOS, we need switch to symbol keyboard by two click, not a good idea. Personally, I prefer to using two finger tap gesture as an alternative.

I have forked it as https://github.com/pinxue/Vim .

git diff is:

diff --git a/src/gui_ios.m b/src/gui_ios.m
index ecd1f11..10b5e7a 100644
--- a/src/gui_ios.m
+++ b/src/gui_ios.m
@@ -128,7 +128,13 @@ enum blink_state {

  • (void)viewDidLoad {
    [super viewDidLoad];
  • UITapGestureRecognizer * tap2fGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(click2f:)];
  • tap2fGestureRecognizer.numberOfTouchesRequired = 2;
  • [_textView addGestureRecognizer:tap2fGestureRecognizer];
  • [tap2fGestureRecognizer release];
  • UITapGestureRecognizer * tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(click:)];
  • tapGestureRecognizer.numberOfTouchesRequired = 1;
    [_textView addGestureRecognizer:tapGestureRecognizer];
    [tapGestureRecognizer release];

@@ -199,6 +205,13 @@ enum blink_state {
gui_send_mouse_event(MOUSE_LEFT, clickLocation.x, clickLocation.y, 1, 0);
}

+- (void)click2f:(UITapGestureRecognizer *)sender {

  • [self becomeFirstResponder];
  • // send ESC
  • char escapeString[] = {ESC, 0};
  • [self insertText:[NSString stringWithUTF8String:escapeString]];
    +}
  • (void)pan:(UIPanGestureRecognizer *)sender {
    CGPoint clickLocation = [sender locationInView:sender.view];

Change Esc key from \ to ` by default

Using \ as the default Esc key makes it pretty hard to write code. I suspect a lot of people have a bluetooth keyboard, on the logitech keyboard in the US the grave key is just below the Esc key. Grave not used much in coding or even writing documents, it seems to me, changing the default vimrc file to map the grave key to Esc would make usability much better.

Yes, the user can create a .vimrc file to do this. It would just be nice to have this mapping by default.

Reading encrypted files hanging vim

Previously saved files encrpyted with :X cannot be unencrypted.
When I open a file :n test.txt which was encrypted using :X it hangs the app.
Also, when I attempt to encrypt using :X, followed by "Enter Encryption Key:" typing in a key hangs app. This started happening with iOS 12, with iPhone 7 Plus..., Gvim 8.1.42, and version 7xxx (not sure what I had installed previously)

High latency when typing

While typing the sentence "this is some high latency," the letters would appear on the screen far behind my typing. After I finished typing the sentence, it took another few seconds for it to fully appear on the screen.

I seems only to have this problem while using my Bluetooth keyboard. It is the same keyboard that I got from Apple with my iMac.

Better support for Bluetooth keyboards (especially ESC).

I use a bluetooth keyboard with my ipad, and I can use esc to exit insert mode when I'm using vim through iSSH, so I know it works. iSSH has really good bluetooth keyboard support, and it would be great if vim supported this too. Not just esc, but control keys.

Thank you for this great app.

Multi-character mappings no longer work

It no longer works to map 2 characters to a command or function. For example:

imap jj <esc> no longer works to map "jj" to the <escape> key. 

Similarly, mapleader no longer works. For example:

let mapleader = "," does not work to allow "," to trigger another defined command or function.

Both of these worked fine a while ago and I can't remember if they broke in the last update of Vim for iPad or if it was after an iOS update.

Would it be possible to fix these?

Strange behavior with accented characters

Hi,

when I type "é" in Vim, it appears as "é "
Same with "ç", which appears as "ç "
(in short, most accented characters appear as "the accented character plus an extra space").

And "à" appears as "| ", which is even weirder.

I have the same behavior using the app from the App Store, the source code compiled and running on the iOS simulator and the source code running on an iPad.

.swp file access required if Vim is killed by iOS

If you switch in and out of Vim via the Home button or by tapping on a notification, then it will be suspended and your state is saved. However, if iOS clears Vim out of memory in the interim (because you run other apps and iOS decides it needs the memory) then your Vim session is quit, leaving swap files lying around.

The .swp files should stop you from losing any data, but it'd be nicer if the user didn't have to deal with them except if Vim actually crashes.

If the file is in a saved state when Vim quits, then the swap files should be removed (as they would be if the user quits via Vim's quit commands).

Vim Settings

I notice that Vim doesn't have a Settings.bundle and many pull requests may be knock back due to lack of user customisability. Thus, there needs to be a way to introduce new features without effecting existing features.

Consider the weird choice (IMHO) of <esc> mapping to \. This is now a feature of the product, any change to this feature breaks the expected behavior of the product and should be avoided (ie. #9). But if it is implemented 'at user option' then all is well. Thus, a proposal for a 'Default <esc> mapping' key in Settings seems sensible. The user can change the mapping to a custom character sequence or choose a predefined gesture. This means that Vim's welcome message could reflect the change for the forgetful (that's me ;) and we can be spared the head scratching when trying to enter \ during insert mode (I don't know about you but I went with :s/$/\\).

And there's another thing, what about back ticks? There really ought to be a mapping for that too...

And there's another thing... Hold up, the Settings.bundle is going to be a really important feature for future features, let's not add keys willy-nilly.

I don't think that completely changing the structure of the Settings.bundle would break anything further down the track but it would be disorienting for the user and I guess there's a chance that it could delete existing user preferences. So I think a hieracharical structure would be best. I would like to see 'Default Mappings > Escape Key'.

What do you think, please comment :)

Keyboard Non-Functional unless powered off and on

I am using a Kensington KeyFolio Pro keyboard and it is having issues with Vim for iPad. In particular, when I launch Vim, I often can't use the keyboard at all, can't get to the command mode or insert mode, etc. Just nothing. Most of the time if I am turn the keyboard off, wait for the on-screen keyboard to appear, then dismiss it and turn the keyboard back on, it works. But sometime even that doesn't do it and I end up having to turn off bluetooth and do much the same thing.

I don't experience any problems with this keyboard in any other app, including many 3rd party applications.

Siri text input not working?

When i try and have Siri accept my voice input. It process, but nothing gets input, in insert mode. Should this be working?

Thanks,

Russ

Allow default of fewer, larger lines?

I can change the font size with e.g. :set guifont=Monaco:h18. However, with larger sizes, there is no built-in font, so Vim has to generate a large font from a small-font fontspec. This looks very ugly on the screen. Unfortunately, on an iPad mini, the default font is very small and difficult to read, so either way, I get a font that's hard to read. (On a full-sized iPad, the default is probably fine.)

I'm wondering whether it would be possible to set the default display size in such a way as to make everything larger--larger, fewer lines of text. The idea is that on a smaller device such as a mini, Monaco:h12, for example, would look as large as Monaco:h18 does now. On a regular iPad, the size of lines should presumably remain the same as it is now.

This option might be configurable, in theory, or it could depend on the device model.
(Again, thanks for porting Vim to iOS.)

:set guifont=* doesn't list fonts

:set guifont=* doesn't do anything, but it is possible to make some font changes using :set guifont. However, it's difficult to experiment with different fonts without knowing what fonts are available.

(This is with vim 7.3, iOS 8.3 on an iPad mini. On the mini, at least, the default font is very small, and there are dropped pixels in some of the characters, making them hard to read. I'm hoping to set the font to a larger, more easily readable one.)

Thank you for porting Vim to iOS!

Space doesn't work well

Hello.

Great project. Unfortunately, not maintained anymore, but I'm still gonna leave a bug report.

In ipados 15.7, in half of the cases space doen't work at all. No space is being typed in insert mode and in command input, and the caret doesn't move in normal mode either. Sometimes it works though.

It also correlates to when backspace works. When space works - then backspace works expectedly (removes the last character). When space doesn't work - backspace also doesn't work, nothing happens on pressing it (including normal mode and when typing a command)

Visual bug in the rightmost column

Screen display of the right-most column (col 77) doesn't work right.

To see this, type :help magic then start scrolling down the page.

Any non-blank character in that last column can be seen moving down the page as you scroll.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.