Results 1 to 10 of 23

Thread: VS Code + Pascal : Editor for the future!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Quote Originally Posted by Ñuño Martínez View Post
    I'm pretty happy with Vim. Actually I think it would be better but I can't back to those CUA editors.
    I did temper with an Emacs package that talked to Lazarus CodeTools for inteliisense and autocompletion and I actually made it work..sortof. When I finish my current project I'll try to get back into vim-script again and rewrite it. With Vim8 and asynchronous i/o support it would be if not easy, so atleast easier then working with Emacs and background processes.

    In short, it shouldn't be that much work involved in writing a vim plugin that talked to a CodeTools server running in the background. With Emacs you had to poll the server to get updates, and pipe them through a hidden buffer into the current buffer you where editing, and that caused lots and lots of overhead, and quite frequently a crash or two (might depend on my not-so-good pascal skills ). If you ever used the vim plugin YouCompleteMe when writing C/C++ code you got a pretty good picture on what I'm aiming for.

    Please let me know if you would be interested in testing it out, or maybe even give me a hand with it. We 'Vimmers' need to stand up for our editor

  2. #2
    I would try.

    I have no experience with vim-script, that is why I tried to create my own editor using Lazarus.
    No signature provided yet.

  3. #3
    Quote Originally Posted by Ñuño Martínez View Post
    I would try.

    I have no experience with vim-script, that is why I tried to create my own editor using Lazarus.
    Vim-script is the epiphany of bad design! It's absolutely awful..but if you manage to get your head around it, it's also very, very powerful. Every little aspect of the editor is scriptable. There is however the possibility to use python IF vim was compiled with support for it. I think that most mainstream versions of pre-compiled vim binaries atleast has support for Python2.6 baked into the executable. Another option is lua, or ruby (in the latter case I do think vim-script is tidier and more comprehensive..)

    Can't find the time for such a big undertaking atm, but when I finish of some other projects I promise that I'll give it a go, a prototype shouldn't take that much time to produce, but I surely could use some help with the backend, which will be written in Pascal. My Emacs 'server' piped string objects back and forth between the CodeTools interface and the Emacs buffer, but I'm pretty sure that there is another, more efficent way of doing this. The Vim-way of swap-files could be abused to achieve a better interface between the two (Vim and CodeTools).

    Disecting the YouCompleteMe source might give me a better understanding on how to proceed.

    Can't help it, but I feel like all 'modern' editors, apart from atom/code/sublime isn't really good at handling large amounts of source-code. One thing I hate is when the editor gives you the option to autoclose brackets/parens etc but doesn't do anything to actually match the pairs.. For example:

    Code:
    constructor TSomeClass.Create(|)
    This happens in most editors when you turn on autoclose ('|' is used to display the cursor position).
    Code:
    constructor TSomeClass.Create(text:string|)
    All is well
    Code:
    constructor TSomeClass.Create(text:string)|)
    What? I typed a closing paren and the stupid editor didn't match parens, so instead of jumping over the closing paren, it inserted a new one. Mumblemumblemumbe. Hit 'del', move pinky to right arrow, move cursor over the stupid paren and insert that semicolon
    Code:
    constructor TSomeClass.Create(text:string);
    In 'real' editors, that doesn't just autoclose, but actually match pairs of brackets/parens ets this would not have happened, and I would be churning out code instead of cursing and moving the cursor by using the arrow keys, which by the way are located far of where your fingertips should be to write fast and efficent.
    Last edited by Rickmeister; 04-02-2017 at 08:18 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •