Giter VIP home page Giter VIP logo

node-iamb's People

Contributors

jordanhendricks avatar melloc avatar

Watchers

 avatar  avatar

node-iamb's Issues

Render Markdown

Mattermost uses Markdown for making text bold/italicized/underlined, and more, like rendering code and tables. iamb will need to render these in an appropriate fashion in the terminal.

To do this, we'll probably want to either enhance the node-termdraw LogBox implementation, or create a special Markdown variant.

Implement case changing operations

The ~ keypress will toggle case, and in visual mode u and U will make the selected text lower or upper case respectively. gu<movement> and gU<movement> allow you to use a movement to change case in normal mode.

By default in vim, pressing ~ will change the case of just the character immediately under the cursor, and move the cursor to the next character. If you run :set tildeop, then ~ will take a movement to specify what text to manipulate. It might be nice to support both modes of operation.

Implement horizontal split screen

In vi, you can split the screen horizontally with :sp and vertically with :vsp. It would be nice if iamb allowed something similar, so that people could layout conversations next to each other as they'd like. You could then resize/cycle/navigate through them with the ^W vi commands.

Release 0.0.2

The current release on npm is just a placeholder that doesn't do much useful. I'm going to publish 0.0.2 so that there's something useful that can actually be installed from npm.

Support macros

Users should be able to press q<k> to start recording a new named macro. I don't know just how useful macros will be for editing messages, but being able to support @: would be nice.

Implement editing history

It would be nice to be able to undo/redo changes made on the editing line using u and ^R. It would also be good to make REPLACE mode actually returned replaced characters when backspacing.

Support attaching files to messages

iamb should allow people to attach files to messages they send. The best way to do this might be to have a :attach command that attaches it to the message currently being edited (and presumably indicates that there's an attachment by updating the line somehow). There could also be a :send command that allows sending a file in the chat instead of attaching it to the message. This may work better with some chat systems, where files get sent directly instead of as part of a message. (I believe IRC and XMPP work this way.)

Want visual mode

Vim has a visual mode that allows one to visually select a range of text and extend the selection using the movement keys. It would be nice to also support it when editing in iamb.

Update to "termdraw" v2.0.0

The changes in 2.0.0 of "termdraw" will allow displaying wide characters (like Emoji) that appear in chat, and also adds some new interfaces to help simplify existing iamb UI logic (and remove the suspend/shell code that reaches into private termdraw fields).

Allow moving between recent rooms with keyboard shortcuts

In vim, ^I and ^O allow you to move around the jumplist, which contains recent locations in the file and other files. A similar feature for jumping to recently viewed rooms would be nice. To make it easy to toggle between views.

Implement joining conference rooms

You can open up a direct chat currently with :dm, but that doesn't work for conference rooms. There should be a :join command to allow joining conference rooms (and possibly group chats?).

Want to use Cueball HTTPS agent

I'd like to use the Cueball agent instead of the normal node.js one. Cueball also allows enabling TCP keep-alives on the socket before handing it off to restify, which will allow us to better handle dead connections.

Implement word movements and character search movements

Basic Vi editing functionality is currently implemented, but it's just the character movements currently. The next thing that should probably be implemented:

  • Word movements (w, W, e, E, b, and B)
  • Moving to a character (f and t)

Implement autocompletion

It would be nice to be able to autocomplete commands and arguments in the command bar with ^D and tab (^I), and complete usernames in the text bar with ^N/^P.

Support text objects and % movement

Vim's text objects are really nice (see :help text-objects), and some of them would be especially handy when editing a message (or code once multiline is supported). There are two styles of text object movements:

  • Around (a) the object, which is block character inclusive
  • Inside (i) the object, which leaves the block characters in place

Vim's supported text objects are:

  • Words (w) and WORDS (W)
  • Sentences (s)
  • Paragraphs (p)
  • Square bracket blocks ([ or ])
  • Parentheses ((, ), or b)
  • Angle blocks (< or >)
  • Curly bracket blocks ({, } or B)
  • Double quotes (")
  • Single quotes (')
  • Backticks (`)

Support multiline editing

iamb should support writing multiline messages. Thinking about it, I believe the best way to do this is by treating enter in INSERT mode as entering another line, and in NORMAL mode as submit. We should also add support for the o and O keys.

Implement copy/paste logic

Once #3 is implemented, that logic can be used to implement delete (d), yank (y), change (c), and paste (p) functionality.

Add further warnings for unimplemented vi bindings

To make it more obvious when behaviour is unimplemented, we should try to warn in all of the places where we should probably do something but don't. This is done for unhandled keys in normal mode, but not done when you enter a microstate, like after pressing d.

Support notification keywords

Users should be able to provide a series of keywords to use to notify them of relevant messages. It would be nice if they could be configurable so that they don't have to be global, but could be defined per-room, per-account, or even by the user who says them. Maybe this could be done using node-ldap-filter, or a simple DSL?

Avoid calling Draw#redraw() from inside controls

When I initially wrote much of the user interface, I placed calls to Draw#redraw() inside the controls after redoing the Region. After writing up some examples for node-termdraw, I'm now convinced that this should be done outside of them, so that there's a cleaner heirarchy of UI controls which need little knowledge about the rest of the program.

Load all users at startup

Now that we can join conference rooms, the fact that we only load usernames for users we have DMs with is more obvious. We should load all users at program startup, and cache their information, and also listen for notifications over the websocket that new users have been created (the user_added message type, I believe).

Want status bar

It'd be nice to have a status bar that shows what mode you're in (e.g. INSERT or REPLACE).

Support pasting in visual mode

In vim, you can visually select a range of characters to replace, and then replace them with text from a register using p/P (both behave the same).

Support replacing characters in simple keybindings

The simple keybindings that vim allows in the command bar allow replacing characters after pressing the Insert key. This puts it into a REPLACE-like mode, and allows you to return to the standard insertion mode by pressing Insert again. (Unlike REPLACE mode though, backspacing does not restore overwritten characters.)

Want basic client functionality

To start off, there needs to be some basic functionality:

  • Connect to Mattermost
  • Load history with a single user for testing
  • Send and receive messages from that user
  • Extremely simple vi functionality

Allow running iamb with different chat backends

As part of #29, some of the more Mattermost specific logic will need to be moved out of iamb, and into the client library (see melloc/iamb-mattermost#6). Both the Mattermost and Matrix client libraries will present the same interface to iamb, allowing this repository to remain largely ignorant of how the two different chat systems work.

Clean up TextBox logic

The TextBox#refresh() method shouldn't be exposed to consumers, but should instead be called whenever internal state changes such that the editor line needs to be redrawn. Additionally, TextBox shouldn't override the Region#resize() method but should instead just listen to the "resize" event and call TextBox#_refresh() then.

Add initial documentation

It'd be useful to have some documentation on getting started, keyboard shortcuts, starting conversations/joining rooms, etc.

Support Matrix

I'd like to get initial support for Matrix going. This will require figuring out what multiple account support looks like. It should be implemented in such a way that multiple accounts of the same type (i.e., three separate Matrix accounts, or two separate Mattermost accounts, etc.) can be supported.

Implement spell checking

Highlighting misspelled words as they're typed would be useful. Users could then interact with the spellchecker through:

  • zg, add word under cursor to dictionary
  • zG, temporarily add word under cursor to dictionary
  • ]s and [s, move to next or previous misspelled word

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.