Programming Puzzles & Code Golf Stack Exchange is a question and answer site for programming puzzle enthusiasts and code golfers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Challenge:

In the programming language of your choice, take no input and output your programming languages name.

Fair enough, right?

Restrictions:

  • You can't use any character that is included in your programming language's name in your code. E.g., if I use Batch, I must not use the chars 'B' 'a' t' 'c' 'h' in my code. Note that this is case sensitive. I can still use the char 'b' because it's different from 'B'.
  • You can have "junk output" before or after the name of the language
  • Version number doesn't count as part of the name of the language. E.g., I can use the number 3 in the code in my answer if it's in Python 3
  • The output of the programming language name is not case sensitive.
  • Brute-forcing all possible letter combinations and hoping you get your language name is forbidden.

Example outputs: (let's say my programming language is called Language) (✔ if valid, else ✖)

  • Language
  • Body language is a type of non-verbal communication in which physical behavior, as opposed to words, is used to express or convey information. Such behavior includes facial expressions, body posture, gestures, eye movement, touch and the use of space.
  • Language 2.0 - © 1078 AD some company
  • foobar

This is thus shortest code wins.

share|improve this question
6  
The rule about case sensitive restrictions is very ambiguous. Which is the correct orthography: BASIC Basic or basic? I'm pretty sure I can find examples for all three. – Level River St Jan 24 at 23:47
6  
Obligatory "Just having your code be blank but have a flag like --version isn't allowed"? – Value Ink Jan 25 at 0:00
65  
Have case-insensitive output while banning the language name case-sensitively allows boring solutions that just output the language name case-swapped. – xnor Jan 25 at 0:47
2  
Does the output need to go to the screen/be printed, or can it be returned as well? – simbabque Jan 25 at 13:48
7  
You made a mistake by allowing users to output junk data. All they have to do is use a language where the compiler include the name whenever there's an error. It's cool but not the challenge I was hoping for – Lynob Jan 26 at 8:23

87 Answers 87

Outputs to STDERR

Outputting to STDERR is now at +33/-21 as an allowed default, which is positive but contested. This is a CW answer to collect answers that just invoke an error in a language where error messages includes the language name.

Haskell, 1 byte

1

Error:

Parse error: naked expression at top level
Perhaps you intended to use TemplateHaskell

Lua, 1 byte

1

Error:

lua: .code.tio:1: syntax error near <eof>

(file name is unimportant)

Batch, 1 byte

~

Error:

'~' is not recognized as an internal or external command,
operable program or batch file.

tinylisp, 5 bytes

(c()1

Error:

Error: cannot cons to non-list in tinylisp

C (gcc), 1 byte

9

Error:

/dev/stdin:1:1: error: expected identifier or ‘(’ before numeric constant

R, 1 byte

)

Error:

Error: unexpected ')' in ")"

Java bytecode, 0 bytes

Error:

Exception in thread "main" java.lang.ClassFormatError: Truncated class file

Groovy, 1 byte

a

Note that a can be replaced with any other character

Error:

groovy.lang.MissingPropertyException: No such property: a ...

MATLAB, 1 byte

\

Error:

Error: Unexpected MATLAB operator.

PHP, 3 bytes

<?=

Error:

PHP Parse error:  syntax error, unexpected end of file in /home/runner/.code.tio on line 1

CJam, 1 byte

/

Error:

/
^
RuntimeException: The stack is empty
Java exception:
java.lang.RuntimeException: The stack is empty
    at net.aditsu.cjam.CJam.pop(CJam.java:75)
    at net.aditsu.cjam.Op2.run(Op2.java:10)
    at net.aditsu.cjam.Block.run(Block.java:304)
    at net.aditsu.cjam.CJam.runCode(CJam.java:210)
    at net.aditsu.cjam.CJam.main(CJam.java:240)

Twig, 2 bytes

Twig is a template language written in PHP. It's possible that this is a polyglot.

{{
{%
{#

Error:

PHP Fatal error:  Uncaught exception 'Twig_Error_Syntax' with message [...] in [...][...]:n:
Stack trace:
#0 [...]

The message varies depending on which program you choose.

S.I.L.O.S, 2 bytes

x+

Try it online! Trivially invokes undocumented behavior. Silos is the name of the language.

Python, 6 bytes

pYTHON

As the character restriction is case insensitive, and the output doesn't have to be in the correct case, this is a valid answer. The error message it produces is something like this:

Traceback (most recent call last):
  File ".code.tio", line 1, in <module>
    pYTHON
NameError: name 'pYTHON' is not defined

Try it online! (outputs to 'debug' tab)

JavaScript, 10 bytes

jAVAsCRIPT

This produces the following error message or similar in all environments:

ReferenceError: jAVAsCRIPT is not defined
share|improve this answer
12  
Isn't the empty string contained in the language's name? :D – mbomb007 Jan 25 at 15:08
13  
The C and R ones are clever. – DLosc Jan 26 at 7:10
1  
@mbomb007 but it's not a character, therefore it's not a character included in the language's name. – immibis Jan 27 at 4:26
    
The PHP version can be disabled, if I'm not mistaken. Using something like <?? will be more effective and can't be disabled. – Ismael Miguel Jan 27 at 14:29

MATL, 1 byte

Y

Output is through STDERR, which is allowed by default.

The output from the offline compiler is

Error using matl_parse (line 339)
MATL error while parsing: Y not recognized at position 1
Error in matl (line 234)
    S = matl_parse(s, useTags); 

Or try it online! (expand "debug" section).

share|improve this answer
5  
Should you merge with this? – wizzwizz4 Jan 25 at 18:31
    
@wizzwizz4 I'm not sure. I asked in chat and got these two replies, so it's not really clear – Luis Mendo Jan 25 at 19:47
1  
yeah but Y tho? – sagiksp Jan 26 at 9:34
    
@sagiksp Anything that throws an error will do, such as X or Z. This is because X, Y or Z are prefixes of two-char function names, so a Y by itself is invalid – Luis Mendo Jan 26 at 10:55

SmileBASIC, 11 bytes

sPsET.,1474

Eqivilant to SPSET 0,1474. Sets sprite 0 to definition 1474, which is the SmileBASIC logo.

Screenshot

share|improve this answer

HTML, 24 20 bytes

&#72;&#84;&#77;&#76;


HTML, 16 bytes

As pointed out by @Bob, modern browsers will recognize HTML entities without semicolons, though it's technically invalid HTML. Of course, it's perfectly valid for code golf.

&#72&#84&#77&#76


HTML, 4 bytes

And of course, the uninteresting answer.

html


Also, see my CSS answer.

share|improve this answer
3  
You can save four characters by using decimal instead: &#72;&#84;&#77;&#76;. You can save an additional four characters by dropping the semicolons, at the cost of being technically invalid HTML (but still working in modern browsers). – Bob Jan 25 at 3:26
    
@Bob Thanks for the tips! – darrylyeo Jan 25 at 3:45
    
Why doesn't HTML count? – OrangeDog Jan 25 at 13:51
1  
@OrangeDog "You can't use any character that is included in your programming language's name in your code" – darrylyeo Jan 25 at 18:39
    
But html should be valid, reducing the score by 12 bytes. – Christoph Jan 27 at 11:09

R, 1 byte:

T

T is an alias for the constant TRUE. So the output for the above is:

[1] TRUE

Since junk is allowed around the name, the “R” in there is the language name.

(As noted in a comment elsewhere, pretty much any single letter and many glyphs will work equally well because they trigger the message “Error: …”, which contains “r”.)

share|improve this answer

Python 2/3, 28 17 (3) and 15 (2) bytes

Python 3

exec("\150elp()")

It concatenates the strings uses the octal 150 which is h and "elp()" and runs the result. This prints the help() command which says "Welcome to Python 3.5's help utility!", meeting the requirements.

Python 2

This uses exactly the same method as the above but without the parentheses

exec"\150elp()"

Try it online

share|improve this answer
    
Not sure help counts, it only works in a REPL environment. – xnor Jan 25 at 1:09
    
It still prints out the Python. That's all that's required. – Jack Bates Jan 25 at 1:16
    
If it works in TIO surely it's a valid answer? – Jack Bates Jan 25 at 1:22
1  
Never mind, I was mistaken and it works as a program. Sorry about that. – xnor Jan 25 at 1:22
3  
p is allowed but P isn't. Rule 1. – Jack Bates Jan 25 at 17:54

C, 0 bytes.

/usr/lib/gcc/i586-linux-gnu/5/../../../i386-linux-gnu/crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status

Try it online!

share|improve this answer
    
where is the name ? Or do you refer to the c characters in there ? – HopefullyHelpful Jan 26 at 11:46
    
This should be marked as C (gcc), because other compilers have different messages. – orlp Jan 26 at 12:47
    
Meh, your c's come from extremely implementation-dependent sources. Would have been nicer if you at least provoked a message that contains c in some boilerplate output. – DepressedDaniel Jan 27 at 3:24
    
@DepressedDaniel undefined reference to 'main' – Loren Pechtel Jan 27 at 5:59
    
@LorenPechtel Fair enough, missed that. – DepressedDaniel Jan 27 at 6:02

Vim, 0 bytes



When you start Vim, the editor displays a splash screen which looks like this:

Vim splash screen

You can see it says Vim here:

Vim splash screen with vim highlighted

Previous answer:

Vim, 1 byte

<Ctrl-C>

In Vim 8, pressing will display Type :quit<Enter> to exit Vim at the last line. I'm not completely sure if this counts.

share|improve this answer
1  
It should count. Ctrl-C actually has its own ASCII code (code 3, also called ETX or "end of text"), so this is a pure-ASCII program (if not purely printable ASCII). You can use that to prove that the program's one byte long, and displaying text on screen counts. – ais523 Jan 25 at 14:36
2  
Since when is "vim" a programming language? – DepressedDaniel Jan 27 at 3:26
2  
@DepressedDaniel vim is actually a scripting language if you take a deeper look into the internals. All those fancy keystrokes are instructions => you're programming when you're controlling your editor. – bash0r Jan 27 at 13:32
1  
+1 freehand circles – SeeOneRhino 19 hours ago

V, 2 bytes

¬U

Try it online!

The obvious answer is:

év~

Try it online!

Which is "Insert the letter 'v', and toggle case". However, since you allow for junk output before/after the language name, this works too.

The ¬ command takes two characters for input, and inserts every ASCII character between them. If we don't supply the second character, it automatically defaults to ÿ (ASCII 0xff), so this program inserts every character in the latin1 encoding between U and ÿ.

share|improve this answer

Huh?, 0 bytes



(no, there's nothing in that code block)

The language is named for its output, so...

In the implementation I checked, the interpreter takes the length mod 8 of each line of a given file, and switches depending on the result. For zero, it prints Huh?. Since it strips trailing newlines, you could also do a 1 byte (\n) version.

Note that it's not outputting to stderr or caseswapping or any other trickery. It's just that Huh?'s very confused interpreter finally came in handy.

share|improve this answer

MATLAB, 3 bytes

ver

Output is as follows. Irrelevant info has been replaced by [...]). Some parts of the output may change depending on version, installed toolboxes etc.

-----------------------------------------------------------------------------------------
MATLAB Version: 8.6.0.267246 (R2015b)
MATLAB License Number: [...]
Operating System: [...]
Java Version: Java 1.7.0_60-b19 with [...]
-----------------------------------------------------------------------------------------
MATLAB                                                Version 8.6         (R2015b)
Communications System Toolbox                         Version 6.1         (R2015b)
Curve Fitting Toolbox                                 Version 3.5.2       (R2015b)
[...]
Wavelet Toolbox                                       Version 4.15        (R2015b)
share|improve this answer
    
Uses a v and an e – Jack Bates Jan 25 at 0:31
    
Your language is Octave, so you can't use v and e. – JungHwan Min Jan 25 at 0:31
4  
Woops. Corrected by changing language to Matlab (which was my initial intent anyway) – Luis Mendo Jan 25 at 0:55

JAVA, 1 byte

1

The output to stderr is:

Main.java:1: error: class, interface, or enum expected
1
^
1 error
Error: Could not find or load main class Main
Command exited with non-zero status 1
    Command being timed: "/srv/wrappers/java-openjdk"
    User time (seconds): 1.40
    System time (seconds): 0.80
    Percent of CPU this job got: 40%
    Elapsed (wall clock) time (h:mm:ss or m:ss): 0:05.40
    Average shared text size (kbytes): 0
    Average unshared data size (kbytes): 0
    Average stack size (kbytes): 0
    Average total size (kbytes): 0
    Maximum resident set size (kbytes): 44564
    Average resident set size (kbytes): 0
    Major (requiring I/O) page faults: 205
    Minor (reclaiming a frame) page faults: 11301
    Voluntary context switches: 2666
    Involuntary context switches: 1677
    Swaps: 0
    File system inputs: 78312
    File system outputs: 0
    Socket messages sent: 0
    Socket messages received: 0
    Signals delivered: 0
    Page size (bytes): 4096
    Exit status: 1 
share|improve this answer
10  
This is output from compilation, rather than running the program. I don't know whether this is allowed by default. – CAD97 Jan 25 at 6:16
2  
Also, if you chose a different file extension, it wouldn’t output "java" would it? (Not sure if that’s possible with java) – Jonas Wielicki Jan 25 at 7:41
7  
if you change from java to java bytecode you could reduce by one character. trying to run empty class file will throw java.lang.ClassFormatError – user902383 Jan 25 at 9:59
2  
Programs outputting to stderr should be edited into this answer. – mbomb007 Jan 25 at 14:47

brainfuck, 54 bytes

+[[-<]-[->]<-]<.<<<<.>>>>-.<<-.<.>>.<<<+++.>>>---.<++.

Outputs brainfuck, assuming an 8-bit tape open on the left. Try it online!

As always, partial credits go to @primo's Hello, World! answer.

Alternatives with different casing

Brainfuck (62 bytes):

+[<-[-<]-[->]<<]<---.<<<<<<--.>>>-.<+.<.>---.<<+++.>>---.<---.

BrainFuck (68 bytes):

-[[-<]->+[->]<-]<<.<<<<<--.>>+.<-.+++++.>>>------.<<<<+++.>>++.<---.
share|improve this answer

><>, 12 10 bytes

"2,:o:2-o|

This will continually print ><> until the interpreter runs out of space.

Try it online!

12 byte version below for those who like a clean output. Recommended by Aaron (no error, 1 output)

":3+:o$1+oo;
share|improve this answer
    
Brilliant solution! – Emigna Jan 25 at 14:14
    
@Emigna - Thanks, the final version was after a bunch of failed golfs but I quite like it because with the error it prints ><> and fish :D – Teal pelican Jan 25 at 15:32
    
Nice one ! Here's a 14 bytes version which only prints once and doesn't errors out : "-o-o-o;_!\ _! – Aaron Jan 25 at 16:37
    
@Aaron if you check the edit the first version did that at 12. I do like how clean yours looks though :) – Teal pelican Jan 26 at 17:28
    
I like your 12 bytes version (the 10 bytes too :)), I think you should have left it included to your answer as an aside ("for those who like a clean output,[...]") ! – Aaron Jan 26 at 17:32

Python, 27 53 49 48 45 bytes

-3 bytes from @wizzwizz4

exec eval('"IMpORT THIS".LOWER()'.swapcase())

Prints the following text, which has "Python" on the first line.

The Zen of Python, by Tim Peters

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
share|improve this answer
1  
@Arnauld fixed! – Value Ink Jan 25 at 0:27
1  
HELP() or HELP(HELP) is shorter. – Gurupad Mamadapur Jan 25 at 8:14
    
It doesn't matter if you swap the case of the import string, because you're making it lower-case anyway. -3 bytes. – wizzwizz4 Jan 25 at 18:39
    
@GurupadMamadapur the Python 3 answer already covered it and better (pretty sure my code would be the exact same), so I'm not in the mood to use it too. Guess I'm sticking to import this. – Value Ink Jan 27 at 9:20
    
@ValueInk Alright then. – Gurupad Mamadapur Jan 27 at 14:00

Python 2 (1 byte)

è

output...:

output

share|improve this answer

bash CLI, 9

printf $0

If you want an actual script and not just a command at the interactive command line, then you can do this:

bash, 13

printf $SHELL

Outputs /bin/bash

share|improve this answer
    
echo $0 should work – squeamish ossifrage Jan 25 at 1:41
    
@squeamishossifrage That works at the shell command line, but in a script it will output the name of the script. – Digital Trauma Jan 25 at 7:08
    
echo $SHELL isn't any better anyway. pastebin.com/BfsWjCni Regardless whether you run it from command line or script and whether you use shebang in that script or not. – manatwork Jan 25 at 9:26
2  
'h' is illigal character for you, and you are using it in echo – user902383 Jan 25 at 11:38
2  
$'ec\x68o' $0 cures that detail. – manatwork Jan 25 at 12:02

dc, 6

25699P

Outputs dc.

Try it online.

share|improve this answer

CSS, 25 bytes

:after{content:'\43\53\53

Note that extra markup is added to Stack Overflow snippets, causing "CSS" to be displayed more than once. Open an .html file with contents

<style>:after{content:'\43\53\53

to see the result as intended.

share|improve this answer

Pip, 8 bytes

'IWR C80

Takes the character I and WRaps it in Chr(80), resulting in PIP. Try it online!

Using the I feels a bit like cheating, so here are two 9-byte solutions that don't use any of PpIi:

z@8WRz@15
(z8+^707)

Both output pip. I'm particularly pleased with the second one:

    ^707   Split 707 into a list of characters        [7;0;7]
  8+       Add 8 to each one                          [15;8;15]
(z      )  Use list to index into lowercase alphabet  ["p";"i";"p"]
           By default, lists are printed without a separator

For proper capitalization, we need a 10-byte solution:

'IWR C80Vx

How this one works is left as an exercise for the reader. ;^)

share|improve this answer

C#, 60 67 bytes

class P{static void Main(){System.\u0043onsole.Write("\x43\x23");}}
share|improve this answer
    
Is this actually your answer, or did a bug messed up your answer? – auhmaan Jan 25 at 14:18
    
@auhmaan Sorry, fixed. I initially tested on LINQPad, and forgot it has a few default namespace imports. – Bob Jan 25 at 14:40
    
I was referring to the \u0043 and alikes – auhmaan Jan 25 at 16:16
1  
@auhmaan That's intentional because I need Console but can't use C as per question rules. In C# you can use Unicode escape sequences in identifiers. – Bob Jan 25 at 16:36
2  
I'm sure you can use an anonymous method for this, I can't see a restriction requiring a full program, so you could do _=>System.\u0043onsole.Write("\x43\x23"); – TheLethalCoder Jan 26 at 16:29

brainfuck, 105 Bytes

--[----->+<]>----.[--->+<]>----.+++[->+++<]>++.++++++++.+++++.--------.-[--->+<]>--.+[->+++<]>+.++++++++.


Try it online here


share|improve this answer
5  
Well, not a problem in BrainFuck ;) – devRicher Jan 25 at 7:24
    
@devRicher not at all ;) – TrojanByAccident Jan 25 at 7:29
1  
The name of the language is "brainfuck" all lowercase. FYI. – mbomb007 Jan 25 at 14:51
    
@mbomb007 I see. – TrojanByAccident Jan 25 at 20:31
    
@mbomb007 updated – TrojanByAccident Jan 25 at 20:52

R, 11 bytes

cat("\x52")

Try it online!

share|improve this answer
    
version$l 9 bytes – djhurio Jan 25 at 13:37
2  
Probably version is enough (7 bytes) – djhurio Jan 25 at 13:39
1  
Or just 'r'. 3 bytes. – Konrad Rudolph Jan 25 at 18:25
    
@KonradRudolph You can't use... wait; the specs are case sensitive in checking but not output... Clever. – wizzwizz4 Jan 25 at 18:42
    
@wizzwizz4 Yeah … but I’ve since posted a solution that only needs one character, and even gets the case right. – Konrad Rudolph Jan 25 at 18:50

Perl 5, 36 bytes (35 + 1 for -E)

$^X=~s/.+(.)(...)$/\U$1\E$2/;say$^X

Run with the -E flag.

$ perl -E 'say$^X=~s/.+(.)(...)$/\U$1\E$2/r'
Perl

The variable $^X is the path to the executable that is running the current program. Since the Perl interpreter is called perl, we then need to make he first letter upper-case. But the ucfirst function contains an r, which is not allowed, so we have to resort to \U and \E, which turn upper-case-conversion on and off.

We cannot use the /r modifier for s/// to return the changed string because the r is not allowed.

It's important to know that the name of the Perl programming language is Perl, and the name of the interpreter is perl with a lower-case p. There is no PERL.

share|improve this answer
    
Technically, I think perl -v satisfies the constraints of the challenge, but this is much more interesting :) Although it makes assumptions that don't hold on all systems (e.g. $^X is /home/foo/.plenv/versions/5.16.3/bin/perl5.16.3 for me, but it could just as well be /home/foo/python if I were twisted like that). – ThisSuitIsBlackNot Jan 25 at 23:22
    
@this not sure if that would be within the rules. They say pick a language and do stuff. But perl -v is not anything in Perl. So I think it doesn't count. But I do think there are easier ways. About the different systems, I think we can fix it with a bit more regex magic. – simbabque Jan 25 at 23:36
    
There are a bunch of zero-byte solutions already that rely on default behavior (e.g. printing of version numbers). Nothing in the rules explicitly prohibits it. But it's definitely boring and feels "cheaty." – ThisSuitIsBlackNot Jan 26 at 0:18
    
Looking at the rules again, you could actually just do the uber boring perl -E'say$^X'. – ThisSuitIsBlackNot Jan 26 at 21:50
2  
How about -E'say`$^X -v`' ? That's indisputably a program. – hobbs 22 hours ago

BASIC (ZX Spectrum), 4 bytes

õ°""

Note: In the ZX Spectrum character set, these bytes display as

PRINT VAL ""

which outputs

C Nonsense in BASIC, 0:1

because the empty string is not a valid numeric expression. (I could of course have used any statement that takes a single integer.) If this answer is unacceptable, then for 6 bytes you can write a program consisting of a single line with one of the keywords that accepts no arguments, then use POKE to replace it with an illegal keyword, then attempt to RUN the program.

share|improve this answer

C 24 20 Bytes (Clang 3.8.1)

Thanks to @squeamish ossifrage for helping me save 4 bytes.

main(){putchar(67);}
share|improve this answer
    
How about putchar(67);? – squeamish ossifrage Jan 25 at 1:36
    
@squeamishossifrage yep, thanks – Wade Tyler Jan 25 at 1:40
    
Just curious, but wouldn't printf('c') also be valid? You're not allowed to use uppercase "C", but you are lowercase, and the result is case-insensitive. – Jocie Jan 25 at 9:51
    
Sure sounds like it would, @jocie, but 67 is shorter than 'c' :-) – Cody Gray Jan 25 at 10:34
1  
@Jocie printf needs a char * so I need to use "" – Wade Tyler Jan 25 at 12:30

Vim, 3 bytes

:h<CR>

Try it online!

This opens up the default help file and outputs:

*help.txt*  For Vim version 7.4.  Last change: 2016 Mar 31

                        VIM - main help file
                                                                         k
      Move around:  Use the cursor keys, or "h" to go left,        h   l
                    "j" to go down, "k" to go up, "l" to go right.   j
Close this window:  Use ":q<Enter>".
   Get out of Vim:  Use ":qa!<Enter>" (careful, all changes are lost!).

Jump to a subject:  Position the cursor on a tag (e.g. |bars|) and hit CTRL-].
   With the mouse:  Double-click the left mouse button on a tag, e.g. |bars|.
        Jump back:  Type CTRL-T or CTRL-O.  Repeat to go further back.

Get specific help:  It is possible to go directly to whatever you want help
                    on, by giving an argument to the |:help| command.
                    Prepend something to specify the context:  *help-context*

                          WHAT          PREPEND    EXAMPLE  ~
                      Normal mode command          :help x
                      Visual mode command     v_       :help v_u
                      Insert mode command     i_       :help i_<Esc>
                      Command-line command    :    :help :quit
                      Command-line editing    c_       :help c_<Del>
                      Vim command argument    -    :help -r
                      Option              '    :help 'textwidth'
                      Regular expression      /    :help /[
                    See |help-summary| for more contexts and an explanation.

  Search for help:  Type ":help word", then hit CTRL-D to see matching
                    help entries for "word".
                    Or use ":helpgrep word". |:helpgrep|

VIM stands for Vi IMproved.  Most of VIM was made by Bram Moolenaar, but only
through the help of many others.  See |credits|.
------------------------------------------------------------------------------
                                                *doc-file-list* *Q_ct*
BASIC:
|quickref|  Overview of the most common commands you will use
|tutor|     30 minutes training course for beginners
|copying|   About copyrights
|iccf|      Helping poor children in Uganda
|sponsor|   Sponsor Vim development, become a registered Vim user
|www|       Vim on the World Wide Web
|bugs|      Where to send bug reports

USER MANUAL: These files explain how to accomplish an editing task.

|usr_toc.txt|   Table Of Contents

Getting Started ~
|usr_01.txt|  About the manuals
|usr_02.txt|  The first steps in Vim
|usr_03.txt|  Moving around
|usr_04.txt|  Making small changes
|usr_05.txt|  Set your settings
|usr_06.txt|  Using syntax highlighting
|usr_07.txt|  Editing more than one file
|usr_08.txt|  Splitting windows
|usr_09.txt|  Using the GUI
|usr_10.txt|  Making big changes
|usr_11.txt|  Recovering from a crash
|usr_12.txt|  Clever tricks

Editing Effectively ~
|usr_20.txt|  Typing command-line commands quickly
|usr_21.txt|  Go away and come back
|usr_22.txt|  Finding the file to edit
|usr_23.txt|  Editing other files
|usr_24.txt|  Inserting quickly
|usr_25.txt|  Editing formatted text
|usr_26.txt|  Repeating
|usr_27.txt|  Search commands and patterns
|usr_28.txt|  Folding
|usr_29.txt|  Moving through programs
|usr_30.txt|  Editing programs
|usr_31.txt|  Exploiting the GUI
|usr_32.txt|  The undo tree

Tuning Vim ~
|usr_40.txt|  Make new commands
|usr_41.txt|  Write a Vim script
|usr_42.txt|  Add new menus
|usr_43.txt|  Using filetypes
|usr_44.txt|  Your own syntax highlighted
|usr_45.txt|  Select your language


REFERENCE MANUAL: These files explain every detail of Vim.  *reference_toc*

General subjects ~
|intro.txt| general introduction to Vim; notation used in help files
|help.txt|  overview and quick reference (this file)
|helphelp.txt|  about using the help files
|index.txt| alphabetical index of all commands
|help-tags| all the tags you can jump to (index of tags)
|howto.txt| how to do the most common editing tasks
|tips.txt|  various tips on using Vim
|message.txt|   (error) messages and explanations
|quotes.txt|    remarks from users of Vim
|develop.txt|   development of Vim
|debug.txt| debugging Vim itself
|uganda.txt|    Vim distribution conditions and what to do with your money

Basic editing ~
|starting.txt|  starting Vim, Vim command arguments, initialisation
|editing.txt|   editing and writing files
|motion.txt|    commands for moving around
|scroll.txt|    scrolling the text in the window
|insert.txt|    Insert and Replace mode
|change.txt|    deleting and replacing text
|indent.txt|    automatic indenting for C and other languages
|undo.txt|  Undo and Redo
|repeat.txt|    repeating commands, Vim scripts and debugging
|visual.txt|    using the Visual mode (selecting a text area)
|various.txt|   various remaining commands
|recover.txt|   recovering from a crash

Advanced editing ~
|cmdline.txt|   Command-line editing
|options.txt|   description of all options
|pattern.txt|   regexp patterns and search commands
|map.txt|   key mapping and abbreviations
|tagsrch.txt|   tags and special searches
|quickfix.txt|  commands for a quick edit-compile-fix cycle
|windows.txt|   commands for using multiple windows and buffers
|tabpage.txt|   commands for using multiple tab pages
|syntax.txt|    syntax highlighting
|spell.txt| spell checking
|diff.txt|  working with two to four versions of the same file
|autocmd.txt|   automatically executing commands on an event
|filetype.txt|  settings done specifically for a type of file
|eval.txt|  expression evaluation, conditional commands
|fold.txt|  hide (fold) ranges of lines

Special issues ~
|print.txt| printing
|remote.txt|    using Vim as a server or client
|term.txt|  using different terminals and mice
|digraph.txt|   list of available digraphs
|mbyte.txt| multi-byte text support
|mlang.txt| non-English language support
|arabic.txt|    Arabic language support and editing
|farsi.txt| Farsi (Persian) editing
|hebrew.txt|    Hebrew language support and editing
|russian.txt|   Russian language support and editing
|ft_ada.txt|    Ada (the programming language) support
|ft_sql.txt|    about the SQL filetype plugin
|rileft.txt|    right-to-left editing mode

GUI ~
|gui.txt|   Graphical User Interface (GUI)
|gui_w32.txt|   Win32 GUI

Interfaces ~
|if_cscop.txt|  using Cscope with Vim
|if_pyth.txt|   Python interface
|if_ruby.txt|   Ruby interface
|debugger.txt|  Interface with a debugger
|sign.txt|  debugging signs

Versions ~
|vim_diff.txt|  Main differences between Nvim and Vim
|vi_diff.txt|   Main differences between Vim and Vi
                                                *sys-file-list*
Remarks about specific systems ~
|os_win32.txt|  MS-Windows
                                                *standard-plugin-list*
Standard plugins ~
|pi_gzip.txt|      Reading and writing compressed files
|pi_netrw.txt|     Reading and writing files over a network
|pi_paren.txt|     Highlight matching parens
|pi_tar.txt|       Tar file explorer
|pi_vimball.txt|   Create a self-installing Vim script
|pi_zip.txt|       Zip archive explorer

LOCAL ADDITIONS:                *local-additions*

------------------------------------------------------------------------------
*bars*      Bars example

Now that you've jumped here with CTRL-] or a double mouse click, you can use
CTRL-T, CTRL-O, g<RightMouse>, or <C-RightMouse> to go back to where you were.

Note that tags are within | characters, but when highlighting is enabled these
characters are hidden.  That makes it easier to read a command.

Anyway, you can use CTRL-] on any word, also when it is not within |, and Vim
will try to find help for it.  Especially for options in single quotes, e.g.
'hlsearch'.

------------------------------------------------------------------------------
 vim:tw=78:fo=tcq2:isk=!-~,^*,^\|,^\":ts=8:ft=help:norl:
share|improve this answer

Groovy, 1 byte

a

In fact, a can be replaced by any character except the ones in Groovy. This raises a MissingPropertyException and outputs the following to STDERR-

groovy.lang.MissingPropertyException: No such property: a ...
share|improve this answer

Labyrinth, 31 28 bytes

76.65.66.89.82.73.78.84.72.@

Try it online!

Prints LABYRINTH.

share|improve this answer

R, 10 bytes

citation()

Outputs :

To cite R in publications use:

R Core Team (2016). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL https://www.R-project.org/.

A BibTeX entry for LaTeX users is

@Manual{,
title = {R: A Language and Environment for Statistical Computing},
author = {{R Core Team}},
organization = {R Foundation for Statistical Computing},
address = {Vienna, Austria},
year = {2016},
url = {https://www.R-project.org/},
}

We have invested a lot of time and effort in creating R, please cite it when using it for data analysis. See also ‘citation("pkgname")’ for citing R packages.

Quite verbose just to have R's name to appear right ?

From @djhurio's comment on an this answer using R, version does the trick too.

share|improve this answer
3  
"The output of the programming language name is not case sensitive." So why not just "r"? Or depending on strict "You can have "junk output" before or after the name of the language." you could also just do T. – Billywob Jan 25 at 11:00
1  
Following on @Billywob 's comment, all that is needed to output is an r or R, so another approach is to output to STDERR via a syntax error. ) outputs Error: unexpected ')' in ")", which contains an r. – rturnbull Jan 25 at 11:56
    
@Billywob I agree to your comment, as well as rturnbull's. I wrote this answer quickly earlier and should have precised that, even though it makes the code and the answer futilely long, I find it funny to output all this junk just to make "R" appears. Moreover, it's the shortest way to my knowledge to write make R write its name on purpose. – Frédéric Jan 25 at 17:36

protected by Community 9 hours ago

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.