summaryrefslogtreecommitdiffstats
path: root/2020/subtitles/emacsconf-2020--30-a-tour-of-vterm--gabriele-bozzola-sbozzolo-autogen.vtt
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2020-12-13 00:06:32 -0500
committerSacha Chua <sacha@sachachua.com>2020-12-13 00:06:32 -0500
commitb98df6fbe2a5c48013cfca81a95a5af41e202d07 (patch)
treefc20f6aca84b73f50eaae13837e2ce6999c0b841 /2020/subtitles/emacsconf-2020--30-a-tour-of-vterm--gabriele-bozzola-sbozzolo-autogen.vtt
parent315add08d9c7f73fb3105940ad5230fb6b050fc2 (diff)
downloademacsconf-wiki-b98df6fbe2a5c48013cfca81a95a5af41e202d07.tar.xz
emacsconf-wiki-b98df6fbe2a5c48013cfca81a95a5af41e202d07.zip
Actually post subtitles, I think
Diffstat (limited to '2020/subtitles/emacsconf-2020--30-a-tour-of-vterm--gabriele-bozzola-sbozzolo-autogen.vtt')
-rw-r--r--2020/subtitles/emacsconf-2020--30-a-tour-of-vterm--gabriele-bozzola-sbozzolo-autogen.vtt634
1 files changed, 634 insertions, 0 deletions
diff --git a/2020/subtitles/emacsconf-2020--30-a-tour-of-vterm--gabriele-bozzola-sbozzolo-autogen.vtt b/2020/subtitles/emacsconf-2020--30-a-tour-of-vterm--gabriele-bozzola-sbozzolo-autogen.vtt
new file mode 100644
index 00000000..49db0989
--- /dev/null
+++ b/2020/subtitles/emacsconf-2020--30-a-tour-of-vterm--gabriele-bozzola-sbozzolo-autogen.vtt
@@ -0,0 +1,634 @@
+WEBVTT
+
+00:00:00.880 --> 00:00:03.760
+hello and welcome to the stock
+
+00:00:03.760 --> 00:00:06.080
+the title of the stock is a tour feature
+
+00:00:06.080 --> 00:00:07.919
+a fast and fully featured terminal
+
+00:00:07.919 --> 00:00:08.559
+emulator
+
+00:00:08.559 --> 00:00:11.840
+inside new e-max so let's try to
+
+00:00:11.840 --> 00:00:13.360
+understand what we mean with the pass
+
+00:00:13.360 --> 00:00:14.559
+and fully featured
+
+00:00:14.559 --> 00:00:17.520
+and to do that we'll compare v term with
+
+00:00:17.520 --> 00:00:18.320
+the
+
+00:00:18.320 --> 00:00:20.640
+packages which are built in Emacs mean
+
+00:00:20.640 --> 00:00:22.400
+the term
+
+00:00:22.400 --> 00:00:25.199
+so let's let's jump into the v term so
+
+00:00:25.199 --> 00:00:26.720
+this is a feature buffer
+
+00:00:26.720 --> 00:00:29.679
+and this is a ansi term buffer what I'm
+
+00:00:29.679 --> 00:00:31.519
+going to do now is first I'm going to
+
+00:00:31.519 --> 00:00:32.160
+prove you
+
+00:00:32.160 --> 00:00:35.760
+what we move fast so to do that let me
+
+00:00:35.760 --> 00:00:37.520
+open a large file display on screen or
+
+00:00:37.520 --> 00:00:39.280
+large file this is about one megabyte of
+
+00:00:39.280 --> 00:00:40.239
+data
+
+00:00:40.239 --> 00:00:43.520
+and let me time that it takes about 0.6
+
+00:00:43.520 --> 00:00:44.160
+seconds
+
+00:00:44.160 --> 00:00:47.200
+with feature let's do the same with
+
+00:00:47.200 --> 00:00:49.760
+with ancient term well we already
+
+00:00:49.760 --> 00:00:51.520
+already see the difference
+
+00:00:51.520 --> 00:00:53.039
+so I will use this time to tell you
+
+00:00:53.039 --> 00:00:54.559
+what's different and
+
+00:00:54.559 --> 00:00:57.360
+what is v term exactly so v term is a
+
+00:00:57.360 --> 00:00:58.879
+terminal emulator built
+
+00:00:58.879 --> 00:01:01.120
+on top of an external library the
+
+00:01:01.120 --> 00:01:02.719
+library is called libvi term
+
+00:01:02.719 --> 00:01:05.519
+and is the same library used by newton
+
+00:01:05.519 --> 00:01:07.200
+for their own terminal emulator
+
+00:01:07.200 --> 00:01:10.000
+it's a c library and this is what gives
+
+00:01:10.000 --> 00:01:10.799
+us
+
+00:01:10.799 --> 00:01:15.119
+a lot of good features first the speed
+
+00:01:15.119 --> 00:01:17.280
+time spent here 0.6 is essentially the
+
+00:01:17.280 --> 00:01:18.479
+time that it takes to
+
+00:01:18.479 --> 00:01:21.520
+one convert the emax representation of
+
+00:01:21.520 --> 00:01:22.240
+like text
+
+00:01:22.240 --> 00:01:23.840
+into the visa and representation of what
+
+00:01:23.840 --> 00:01:26.400
+was a string and two into
+
+00:01:26.400 --> 00:01:28.479
+actually displaying that and that can
+
+00:01:28.479 --> 00:01:29.520
+take time
+
+00:01:29.520 --> 00:01:31.840
+if there's a if there's quantification
+
+00:01:31.840 --> 00:01:33.680
+involved so these are the 0.6 seconds
+
+00:01:33.680 --> 00:01:34.240
+there
+
+00:01:34.240 --> 00:01:36.960
+as we say in the in ancestor that's much
+
+00:01:36.960 --> 00:01:37.920
+much
+
+00:01:37.920 --> 00:01:39.920
+more time it's much slower so the
+
+00:01:39.920 --> 00:01:41.680
+terminal will feel much snappier much
+
+00:01:41.680 --> 00:01:42.880
+faster
+
+00:01:42.880 --> 00:01:46.079
+but that's not the main benefit or the
+
+00:01:46.079 --> 00:01:47.840
+only benefit of using this external
+
+00:01:47.840 --> 00:01:48.799
+library
+
+00:01:48.799 --> 00:01:52.320
+feature the second big benefit
+
+00:01:52.320 --> 00:01:55.439
+is that v term has support for all the
+
+00:01:55.439 --> 00:01:56.560
+escape codes
+
+00:01:56.560 --> 00:01:59.200
+that exterm has support for so v term is
+
+00:01:59.200 --> 00:02:01.119
+essentially as running x term
+
+00:02:01.119 --> 00:02:03.600
+inside an imax buffer so let's see that
+
+00:02:03.600 --> 00:02:04.799
+this for example
+
+00:02:04.799 --> 00:02:07.119
+let's start by looking at the support
+
+00:02:07.119 --> 00:02:08.239
+for colors
+
+00:02:08.239 --> 00:02:09.920
+we have support for all the colors out
+
+00:02:09.920 --> 00:02:11.840
+of the box we don't have to do anything
+
+00:02:11.840 --> 00:02:15.040
+and if we did the same here well we have
+
+00:02:15.040 --> 00:02:15.680
+only
+
+00:02:15.680 --> 00:02:17.920
+20 colors there's a way to get all the
+
+00:02:17.920 --> 00:02:19.680
+colors but it's much more involved
+
+00:02:19.680 --> 00:02:23.040
+but this is not where v term shines
+
+00:02:23.040 --> 00:02:26.000
+uh we can run all the commands that we
+
+00:02:26.000 --> 00:02:27.200
+want
+
+00:02:27.200 --> 00:02:30.480
+h top and cdu
+
+00:02:30.480 --> 00:02:33.040
+everything runs here also this title
+
+00:02:33.040 --> 00:02:33.840
+it's a
+
+00:02:33.840 --> 00:02:36.400
+it's a fairly complicated manipulation
+
+00:02:36.400 --> 00:02:37.040
+of
+
+00:02:37.040 --> 00:02:40.879
+the window and it will not work here
+
+00:02:40.879 --> 00:02:42.319
+it just doesn't work actually now the
+
+00:02:42.319 --> 00:02:44.640
+terminal is probably messed up
+
+00:02:44.640 --> 00:02:48.400
+yes so using this external library
+
+00:02:48.400 --> 00:02:50.959
+removes the burden from the developers
+
+00:02:50.959 --> 00:02:52.000
+of having to implement
+
+00:02:52.000 --> 00:02:54.000
+support for all these cape codes we just
+
+00:02:54.000 --> 00:02:55.360
+use those
+
+00:02:55.360 --> 00:02:58.480
+so in many ways running veteran
+
+00:02:58.480 --> 00:03:01.760
+is us running extern inside a max
+
+00:03:01.760 --> 00:03:04.400
+but it's better than that because since
+
+00:03:04.400 --> 00:03:05.840
+this is an e-max buffer
+
+00:03:05.840 --> 00:03:08.879
+we can enjoy a lot of features from
+
+00:03:08.879 --> 00:03:09.760
+Emacs
+
+00:03:09.760 --> 00:03:11.920
+as well as a tighter integration with
+
+00:03:11.920 --> 00:03:13.200
+e-max itself
+
+00:03:13.200 --> 00:03:16.560
+for example as you see here the title of
+
+00:03:16.560 --> 00:03:17.599
+my buffer
+
+00:03:17.599 --> 00:03:20.720
+is from the director I'm in so let's go
+
+00:03:20.720 --> 00:03:21.760
+to my tmp
+
+00:03:21.760 --> 00:03:24.799
+the title will change so there's
+
+00:03:24.799 --> 00:03:26.560
+information being exchanged between v
+
+00:03:26.560 --> 00:03:28.000
+term and index
+
+00:03:28.000 --> 00:03:29.760
+and of course the title is not the only
+
+00:03:29.760 --> 00:03:32.000
+place where information is exchanged
+
+00:03:32.000 --> 00:03:34.799
+I can find a file and I will be in the
+
+00:03:34.799 --> 00:03:35.920
+directory
+
+00:03:35.920 --> 00:03:38.239
+where my terminal is this feature is
+
+00:03:38.239 --> 00:03:40.000
+also available in nc term
+
+00:03:40.000 --> 00:03:41.680
+and it works also on b term and it
+
+00:03:41.680 --> 00:03:43.840
+follows me so if I go to tmp I'll get
+
+00:03:43.840 --> 00:03:44.720
+the tmp
+
+00:03:44.720 --> 00:03:48.000
+if I ssh to a remote server it will work
+
+00:03:48.000 --> 00:03:48.640
+also
+
+00:03:48.640 --> 00:03:51.120
+on remote servers as well which is a
+
+00:03:51.120 --> 00:03:53.920
+very nice way to edit files remotely
+
+00:03:53.920 --> 00:03:55.760
+while we're working on a shelf and
+
+00:03:55.760 --> 00:03:57.360
+second while vterm
+
+00:03:57.360 --> 00:03:59.599
+is not an e-lisp interpreter like
+
+00:03:59.599 --> 00:04:02.159
+initial what we can do is we can
+
+00:04:02.159 --> 00:04:06.080
+still run inbox functions so for example
+
+00:04:06.080 --> 00:04:08.319
+that requires some configuration the
+
+00:04:08.319 --> 00:04:10.159
+term
+
+00:04:10.159 --> 00:04:12.480
+command message I as you see there's a
+
+00:04:12.480 --> 00:04:14.000
+higher so what I'm doing
+
+00:04:14.000 --> 00:04:16.239
+is I'm executing the eagles function I
+
+00:04:16.239 --> 00:04:17.199
+and I can drop that
+
+00:04:17.199 --> 00:04:19.840
+and turn it around uh hash function to
+
+00:04:19.840 --> 00:04:20.320
+run
+
+00:04:20.320 --> 00:04:24.880
+a-list functions or another one file see
+
+00:04:24.880 --> 00:04:27.600
+we call this feature message passing and
+
+00:04:27.600 --> 00:04:28.800
+it requires
+
+00:04:28.800 --> 00:04:30.880
+some configuration on the emac side as
+
+00:04:30.880 --> 00:04:32.000
+well as in the shell side
+
+00:04:32.000 --> 00:04:34.000
+it's important to stress what's the
+
+00:04:34.000 --> 00:04:35.360
+nature of feature
+
+00:04:35.360 --> 00:04:37.360
+for instance every time I'm sending a
+
+00:04:37.360 --> 00:04:39.120
+key binding it's not immediately clear
+
+00:04:39.120 --> 00:04:40.800
+if my intention is to send it to the
+
+00:04:40.800 --> 00:04:42.720
+shell or to imax so v term implements
+
+00:04:42.720 --> 00:04:44.320
+some reasonable defaults
+
+00:04:44.320 --> 00:04:46.800
+but at the moment it's mainly packaged
+
+00:04:46.800 --> 00:04:49.120
+to display characters on a screen
+
+00:04:49.120 --> 00:04:51.199
+so for example if you're using evil the
+
+00:04:51.199 --> 00:04:53.600
+editing commands in evil will not work
+
+00:04:53.600 --> 00:04:55.759
+immediately there's some work to be done
+
+00:04:55.759 --> 00:04:57.840
+and integration can be improved on that
+
+00:04:57.840 --> 00:04:58.479
+side but
+
+00:04:58.479 --> 00:05:00.240
+sometimes we really want this to behave
+
+00:05:00.240 --> 00:05:02.240
+exactly like a imax buffer
+
+00:05:02.240 --> 00:05:05.440
+we want to be able to search if
+
+00:05:05.440 --> 00:05:07.039
+if I try to get it to search it will not
+
+00:05:07.039 --> 00:05:08.880
+work I will send it to the shop so to do
+
+00:05:08.880 --> 00:05:09.360
+that
+
+00:05:09.360 --> 00:05:12.400
+we enabled the term copy mode so as you
+
+00:05:12.400 --> 00:05:12.800
+see
+
+00:05:12.800 --> 00:05:15.280
+copy mode and now this buffer is
+
+00:05:15.280 --> 00:05:17.039
+essentially a fundamental buffer
+
+00:05:17.039 --> 00:05:21.120
+I can move around as I can search
+
+00:05:21.120 --> 00:05:24.400
+uh so it must have I
+
+00:05:24.400 --> 00:05:25.840
+can do everything I want and there are
+
+00:05:25.840 --> 00:05:27.120
+additional features for example I can
+
+00:05:27.120 --> 00:05:29.600
+jump around
+
+00:05:29.600 --> 00:05:31.440
+all the prompts and I find this
+
+00:05:31.440 --> 00:05:32.639
+extremely useful
+
+00:05:32.639 --> 00:05:34.400
+because I can copy update from my
+
+00:05:34.400 --> 00:05:35.919
+programs or
+
+00:05:35.919 --> 00:05:39.199
+what I always have to do is I have to
+
+00:05:39.199 --> 00:05:42.400
+google some errors so what I do is I
+
+00:05:42.400 --> 00:05:43.120
+select that
+
+00:05:43.120 --> 00:05:45.919
+and I have my keybinding in maksakov and
+
+00:05:45.919 --> 00:05:46.880
+I'm googling
+
+00:05:46.880 --> 00:05:49.199
+what I have to google so this is very
+
+00:05:49.199 --> 00:05:50.400
+nice and
+
+00:05:50.400 --> 00:05:52.800
+if I now that have selected something if
+
+00:05:52.800 --> 00:05:54.400
+I just press return I will
+
+00:05:54.400 --> 00:05:57.120
+go back to my normal editing mode with
+
+00:05:57.120 --> 00:05:57.440
+the
+
+00:05:57.440 --> 00:06:00.400
+text copied so I can paste it back so
+
+00:06:00.400 --> 00:06:01.600
+it's a quick way to
+
+00:06:01.600 --> 00:06:04.160
+interact with copy and interact with uh
+
+00:06:04.160 --> 00:06:06.400
+with the output of a buffer so finally
+
+00:06:06.400 --> 00:06:07.840
+let's discuss how to actually
+
+00:06:07.840 --> 00:06:10.560
+use beta let's circle back and let's go
+
+00:06:10.560 --> 00:06:12.400
+and let's look at the github repo
+
+00:06:12.400 --> 00:06:14.400
+where development is happening v term is
+
+00:06:14.400 --> 00:06:15.520
+available in velpa
+
+00:06:15.520 --> 00:06:17.919
+but since it's leveraging the power of
+
+00:06:17.919 --> 00:06:18.960
+an external module
+
+00:06:18.960 --> 00:06:20.639
+you must have Emacs compiled with
+
+00:06:20.639 --> 00:06:22.000
+support for modules
+
+00:06:22.000 --> 00:06:25.600
+and many distros like ubuntu debian
+
+00:06:25.600 --> 00:06:27.199
+that's not there so you have to get
+
+00:06:27.199 --> 00:06:29.840
+Emacs with support for modules compiling
+
+00:06:29.840 --> 00:06:30.160
+or
+
+00:06:30.160 --> 00:06:32.000
+getting images somewhere else and also
+
+00:06:32.000 --> 00:06:33.840
+the first time you are going to use this
+
+00:06:33.840 --> 00:06:34.400
+which
+
+00:06:34.400 --> 00:06:37.440
+works only on mac or
+
+00:06:37.440 --> 00:06:40.319
+new linux systems Emacs will try to find
+
+00:06:40.319 --> 00:06:41.759
+and compile this module
+
+00:06:41.759 --> 00:06:43.680
+so it's important this requirement is
+
+00:06:43.680 --> 00:06:45.440
+important if you're using windows
+
+00:06:45.440 --> 00:06:47.600
+well that's not it's not available and
+
+00:06:47.600 --> 00:06:49.199
+will not work
+
+00:06:49.199 --> 00:06:52.560
+so to conclude I want to just advertise
+
+00:06:52.560 --> 00:06:53.440
+this page
+
+00:06:53.440 --> 00:06:56.240
+if you have problems look at the issues
+
+00:06:56.240 --> 00:06:57.120
+and
+
+00:06:57.120 --> 00:06:59.039
+open unusual in case we'll try to help
+
+00:06:59.039 --> 00:07:00.800
+you we are very excited about feature
+
+00:07:00.800 --> 00:07:02.639
+and I think it's a transformative
+
+00:07:02.639 --> 00:07:10.319
+terminal experience inside glue imax