Skip to main content
Commonmark migration
Source Link

#Vim, 43, 41 bytes

Vim, 43, 41 bytes

qqSLoading... |<esc>:sl250m
r/@:r-@:r\@:@qq@q

Two bytes saved thanks to @Udioica!

Here's a (slightly outdated) animation of it happening in real time!

enter image description here

And here is an explanation:

qq                              " Start recording into register 'q'
  SLoading... |<esc>            " Replace all of the text in the buffer with 'Loading... |'
                    :sl250m     " Sleep for 250 ms
r/                              " Replace the bar with a slash
  @:                            " Re-run the last ex command (sleeping)
    r-                          " Replace the slash with a dash
      @:                        " Re-run the last ex command (sleeping)
        r\                      " Replace the dash with a backslash
          @:                    " Re-run the last ex command (sleeping)
            @q                  " Run macro 'q' (the one we're recording)
              q                 " Stop recording
               @q               " Call macro 'q', which will run forever because it's recursive

#Vim, 43, 41 bytes

qqSLoading... |<esc>:sl250m
r/@:r-@:r\@:@qq@q

Two bytes saved thanks to @Udioica!

Here's a (slightly outdated) animation of it happening in real time!

enter image description here

And here is an explanation:

qq                              " Start recording into register 'q'
  SLoading... |<esc>            " Replace all of the text in the buffer with 'Loading... |'
                    :sl250m     " Sleep for 250 ms
r/                              " Replace the bar with a slash
  @:                            " Re-run the last ex command (sleeping)
    r-                          " Replace the slash with a dash
      @:                        " Re-run the last ex command (sleeping)
        r\                      " Replace the dash with a backslash
          @:                    " Re-run the last ex command (sleeping)
            @q                  " Run macro 'q' (the one we're recording)
              q                 " Stop recording
               @q               " Call macro 'q', which will run forever because it's recursive

Vim, 43, 41 bytes

qqSLoading... |<esc>:sl250m
r/@:r-@:r\@:@qq@q

Two bytes saved thanks to @Udioica!

Here's a (slightly outdated) animation of it happening in real time!

enter image description here

And here is an explanation:

qq                              " Start recording into register 'q'
  SLoading... |<esc>            " Replace all of the text in the buffer with 'Loading... |'
                    :sl250m     " Sleep for 250 ms
r/                              " Replace the bar with a slash
  @:                            " Re-run the last ex command (sleeping)
    r-                          " Replace the slash with a dash
      @:                        " Re-run the last ex command (sleeping)
        r\                      " Replace the dash with a backslash
          @:                    " Re-run the last ex command (sleeping)
            @q                  " Run macro 'q' (the one we're recording)
              q                 " Stop recording
               @q               " Call macro 'q', which will run forever because it's recursive
added 25 characters in body
Source Link
DJMcMayhem
  • 59.6k
  • 17
  • 196
  • 348

#Vim, 4343, 41 bytes

iLoadingqqSLoading... |<esc>qqr/|<esc>:sl250m
r/@:r-@:r\@:r|@:@qq@q

Two bytes saved thanks to @Udioica!

Here's ana (slightly outdated) animation of it happening in real time!

enter image description here

And here is an explanation:

iLoading... |<esc>              " Enter the text 'Loading... |'
qq                  qq            " Start recording into register 'q'
            SLoading... |<esc>       r/     " Replace all of the "text Replacein the barbuffer with a'Loading... slash|'
                      :sl250m     " Sleep for 250 ms
r-/                              " Replace the slashbar with a dashslash
  @:                            " Re-run the last ex command (sleeping)
    r\r-                          " Replace the dashslash with a backslashdash
      @:                        " Re-run the last ex command (sleeping)
        r|r\                      " Replace the backslashdash with a barbackslash
          @:                    " Re-run the last ex command (sleeping)
            @q                  " Run macro 'q' (the one we're recording)
              q                 " Stop recording
               @q               " Call macro 'q', which will run forever because it's recursive

#Vim, 43 bytes

iLoading... |<esc>qqr/:sl250m
r-@:r\@:r|@:@qq@q

Here's an animation of it happening in real time!

enter image description here

And here is an explanation:

iLoading... |<esc>              " Enter the text 'Loading... |'
                  qq            " Start recording into register 'q'
                    r/          " Replace the bar with a slash
                      :sl250m   " Sleep for 250 ms
r-                              " Replace the slash with a dash
  @:                            " Re-run the last ex command (sleeping)
    r\                          " Replace the dash with a backslash
      @:                        " Re-run the last ex command (sleeping)
        r|                      " Replace the backslash with a bar
          @:                    " Re-run the last ex command (sleeping)
            @q                  " Run macro 'q' (the one we're recording)
              q                 " Stop recording
               @q               " Call macro 'q', which will run forever because it's recursive

#Vim, 43, 41 bytes

qqSLoading... |<esc>:sl250m
r/@:r-@:r\@:@qq@q

Two bytes saved thanks to @Udioica!

Here's a (slightly outdated) animation of it happening in real time!

enter image description here

And here is an explanation:

qq                              " Start recording into register 'q'
  SLoading... |<esc>            " Replace all of the text in the buffer with 'Loading... |'
                    :sl250m     " Sleep for 250 ms
r/                              " Replace the bar with a slash
  @:                            " Re-run the last ex command (sleeping)
    r-                          " Replace the slash with a dash
      @:                        " Re-run the last ex command (sleeping)
        r\                      " Replace the dash with a backslash
          @:                    " Re-run the last ex command (sleeping)
            @q                  " Run macro 'q' (the one we're recording)
              q                 " Stop recording
               @q               " Call macro 'q', which will run forever because it's recursive
added 978 characters in body
Source Link
DJMcMayhem
  • 59.6k
  • 17
  • 196
  • 348

#Vim, 43 bytes

iLoading... |<esc>qqr/:sl250m
r-@:r\@:r|@:@qq@q

Here's an animation of it happening in real time!

enter image description here

And here is an explanation:

iLoading... |<esc>              " Enter the text 'Loading... |'
                  qq            " Start recording into register 'q'
                    r/          " Replace the bar with a slash
                      :sl250m   " Sleep for 250 ms
r-                              " Replace the slash with a dash
  @:                            " Re-run the last ex command (sleeping)
    r\                          " Replace the dash with a backslash
      @:                        " Re-run the last ex command (sleeping)
        r|                      " Replace the backslash with a bar
          @:                    " Re-run the last ex command (sleeping)
            @q                  " Run macro 'q' (the one we're recording)
              q                 " Stop recording
               @q               " Call macro 'q', which will run forever because it's recursive

#Vim, 43 bytes

iLoading... |<esc>qqr/:sl250m
r-@:r\@:r|@:@qq@q

Here's an animation of it happening in real time!

enter image description here

#Vim, 43 bytes

iLoading... |<esc>qqr/:sl250m
r-@:r\@:r|@:@qq@q

Here's an animation of it happening in real time!

enter image description here

And here is an explanation:

iLoading... |<esc>              " Enter the text 'Loading... |'
                  qq            " Start recording into register 'q'
                    r/          " Replace the bar with a slash
                      :sl250m   " Sleep for 250 ms
r-                              " Replace the slash with a dash
  @:                            " Re-run the last ex command (sleeping)
    r\                          " Replace the dash with a backslash
      @:                        " Re-run the last ex command (sleeping)
        r|                      " Replace the backslash with a bar
          @:                    " Re-run the last ex command (sleeping)
            @q                  " Run macro 'q' (the one we're recording)
              q                 " Stop recording
               @q               " Call macro 'q', which will run forever because it's recursive
added 2 characters in body
Source Link
DJMcMayhem
  • 59.6k
  • 17
  • 196
  • 348
Loading
Source Link
DJMcMayhem
  • 59.6k
  • 17
  • 196
  • 348
Loading