Code sections in Sublime text conveniently collapse, for example:
## Client
def start_link(_\\[]), do: GenServer.start_link(__MODULE__, %MainLink.State{mobile: mobile}, name: MLink)
def code(code), do: GenServer.call(MLink, {:code, code})
def fwd(v, dc_id), do: GenServer.cast(MLink, {:forward, v, dc_id})
def upload_done(is_big, id, name, parts, user_id), do: GenServer.cast(MLink, {:upload_done, is_big, id, name, parts, user_id})
def text(user_id, text), do: GenServer.cast(MLink, {:send_text, user_id, text})
def media(user_id, file), do: GenServer.cast(MLink, {:send_media, user_id, file})
def test(data), do: GenServer.cast(MLink, {:test, data})
def update_salt(salt, dc_id), do: GenServer.call(MLink, {:update_salt, salt, dc_id})
def reverse_geo(uid, msg_id, place), do: GenServer.cast(MLink, {:reverse_geo, uid, msg_id, place})
## Server
def init(s) do
GenServer.cast(self, :start)
{:ok, s}
end
def handle_cast(:start, s), do: {:noreply, _start(s)}
def handle_cast({:forward, v, dc_id}, s), do: {:noreply, forward(v, dc_id, s)}
def handle_cast({:send_text, user_id, text}, s), do: {:noreply, messages_sendText(user_id, text, s)}
def handle_cast({:send_media, user_id, file}, s), do: {:noreply, messages_sendMedia(user_id, file, s)}
def handle_cast({:upload_done, is_big, id, name, parts, user_id}, s), do: {:noreply, messages_uploaded(is_big, id, name, parts, user_id, s)}
def handle_cast({:test, data}, s), do: {:noreply, send_message(data, s, true)}
The above simply collapses into
## Client
## Server
Please how can we enable similar in Atom?
Ehm mine does it by default by moving the mouse over the gutter (line numbers on the left). It shows a little triangle which you can click to collapse the region.
Version 1.11.1 (all non core packages were disabled).