diff --git wp-admin/css/wp-admin.css wp-admin/css/wp-admin.css
index 7ca3745..8033047 100644
--- wp-admin/css/wp-admin.css
+++ wp-admin/css/wp-admin.css
@@ -5847,10 +5847,6 @@ body.full-overlay-active {
 	width: 98%;
 }
 
-#template div {
-	margin-right: 190px;
-}
-
 p.pagenav {
 	margin: 0;
 	display: inline;
@@ -7921,12 +7917,19 @@ h3 span {
 	font-weight: normal;
 }
 
-#template textarea {
-	font-family: Consolas, Monaco, monospace;
-	font-size: 12px;
-	width: 97%;
-	background: #f9f9f9;
-	outline: none;
+#wp-ace-editor {
+	position: relative;
+	width: 75%;
+	height: 400px;
+	margin-right: 190px;
+}
+
+#newcontent {
+	display: none;
+}
+
+#editor-mods {
+	margin-bottom: 10px;
 }
 
 #template p {
diff --git wp-admin/includes/code-editor.php wp-admin/includes/code-editor.php
new file mode 100644
index 0000000..3d6e593
--- /dev/null
+++ wp-admin/includes/code-editor.php
@@ -0,0 +1,111 @@
+<?php
+$editor_modes = array(
+	'asciidoc' => 'ASCII Doc',
+	'c_cpp' => 'C/C++',
+	'clojure' => 'Clojure',
+	'coffee' => 'CoffeeScript',
+	'coldfusion' => 'ColdFusion',
+	'csharp' => 'C#',
+	'css' => '',
+	'curly' => 'Curly',
+	'dart' => 'Dart',
+	'diff' => 'Difference',
+	'django' => 'Django',
+	'dot' => 'Dot',
+	'golang' => 'Go',
+	'groovy' => 'Groovy',
+	'haml' => '',
+	'haxe' => 'Haxe',
+	'html' => '',
+	'jade' => 'Jade',
+	'java' => 'Java',
+	'javascript' => 'JavaScript',
+	'json' => '',
+	'jsp' => '',
+	'jsx' => '',
+	'latex' => 'Latex',
+	'less' => '',
+	'liquid' => 'Liquid',
+	'lisp' => 'Lisp',
+	'livescript' => 'LiveScript',
+	'lua' => 'Lua',
+	'luapage' => 'Lua Page',
+	'lucene' => 'Lucene',
+	'makefile' => 'Makefile',
+	'markdown' => 'Markdown',
+	'objectivec' => 'Objective-C',
+	'ocaml' => 'OCaml',
+	'perl' => 'Perl',
+	'pgsql' => 'PL/pgSQL',
+	'php' => '',
+	'powershell' => 'PowerShell',
+	'python' => 'Python',
+	'r' => '',
+	'rdoc' => 'RDoc',
+	'rhtml' => '',
+	'ruby' => 'Ruby',
+	'scad' => '',
+	'scala' => 'Scala',
+	'scheme' => 'Scheme',
+	'scss' => '',
+	'sh' => 'Shell',
+	'sql' => '',
+	'stylus' => 'Stylus',
+	'svg' => '',
+	'tcl' => '',
+	'tex' => 'TeX',
+	'text' => 'Text',
+	'textile' => 'Textile',
+	'tm_snippet' => 'Textmate Snippet',
+	'typescript' => 'TypeScript',
+	'vbscript' => 'VBScript',
+	'xml' => '',
+	'xquery' => 'XQuery',
+	'yaml' => ''
+);
+
+$editor_themes = array(
+	'chaos', 'chrome', 'clouds', 'clouds_midnight', 'cobalt', 'crimson_editor',
+	'dawn', 'dreamweaver', 'eclipse', 'github', 'idle_fingers',
+	'kr', 'merbivore', 'mono_industrial', 'monokai', 'pastel_on_dark',
+	'solarized_dark', 'solarized_light', 'textmate', 'tomorrow',
+	'tomorrow_night', 'tomorrow_night_blue', 'tomorrow_night_bright', 'tomorrow_night_eighties',
+	'twilight', 'vibrant_link', 'xcode'
+);
+
+$current_mode = '';
+if ( ! empty( $_GET['editor-mode'] ) )
+	$current_mode = $_GET['editor-mode'];
+
+if ( ! empty( $file ) ) {
+	$filetype = wp_check_filetype( $file );
+	if ( empty( $filetype['ext'] ) && '.php' === substr( $file, -4 ) ) {
+		$current_mode = 'php';
+	} elseif ( ! empty( $filetype['ext'] ) && in_array( $filetype['ext'], array_keys( $editor_modes ) ) ) {
+		$current_mode = $filetype['ext'];
+	}
+}
+?>
+<form id="editor-mods">
+	<select name="editor-theme">
+		<option value="">- <?php _e( 'Code Editor Theme' ) ?> -</option>
+		<?php foreach ( $editor_themes as $editor_theme ): ?>
+		<option <?php selected( ! empty( $_GET['editor-theme'] ) && $_GET['editor-theme'] === $editor_theme ) ?> value="<?php echo $editor_theme ?>">
+			<?php echo ucwords( str_replace( '_', ' ', $editor_theme ) ) ?>
+		</option>
+		<?php endforeach ?>
+	</select>
+	<select name="editor-mode">
+		<option value="">- <?php _e( 'Code Editor Mode' ) ?> -</option>
+		<?php foreach ( $editor_modes as $editor_mode => $label ): ?>
+		<option <?php selected( ! empty( $current_mode ) && $editor_mode === $current_mode );
+			?> value="<?php echo $editor_mode ?>"><?php
+			if ( empty( $label ) )
+				echo strtoupper( $editor_mode );
+			else
+				echo $label;
+			?></option>
+		<?php endforeach ?>
+	</select>
+	<input type="submit" class="button" value="<?php esc_attr_e( 'Update Editor' ) ?>" />
+</form>
\ No newline at end of file
diff --git wp-admin/plugin-editor.php wp-admin/plugin-editor.php
index 122362a..395577d 100644
--- wp-admin/plugin-editor.php
+++ wp-admin/plugin-editor.php
@@ -44,6 +44,14 @@ $file = validate_file_to_edit($file, $plugin_files);
 $real_file = WP_PLUGIN_DIR . '/' . $file;
 $scrollto = isset($_REQUEST['scrollto']) ? (int) $_REQUEST['scrollto'] : 0;
 
+$editor_mods = '';
+if ( ! empty( $_REQUEST['editor-theme'] ) || ! empty( $_REQUEST['editor-mode'] ) ) {
+	if ( ! empty( $_REQUEST['editor-theme'] ) )
+		$editor_mods .= '&editor-theme=' . $_REQUEST['editor-theme'];
+	if ( ! empty( $_REQUEST['editor-mode'] ) )
+		$editor_mods .= '&editor-mode=' . $_REQUEST['editor-mode'];
+}
+
 switch ( $action ) {
 
 case 'update':
@@ -69,9 +77,9 @@ case 'update':
 			wp_redirect(add_query_arg('_wpnonce', wp_create_nonce('edit-plugin-test_' . $file), "plugin-editor.php?file=$file&liveupdate=1&scrollto=$scrollto&networkwide=" . $network_wide));
 			exit;
 		}
-		wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") );
+		wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto$editor_mods") );
 	} else {
-		wp_redirect( self_admin_url("plugin-editor.php?file=$file&scrollto=$scrollto") );
+		wp_redirect( self_admin_url("plugin-editor.php?file=$file&scrollto=$scrollto$editor_mods") );
 	}
 	exit;
 
@@ -89,7 +97,7 @@ default:
 		if ( ( ! empty( $_GET['networkwide'] ) && ! is_plugin_active_for_network($file) ) || ! is_plugin_active($file) )
 			activate_plugin($file, "plugin-editor.php?file=$file&phperror=1", ! empty( $_GET['networkwide'] ) ); // we'll override this later if the plugin can be included without fatal error
 
-		wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto") );
+		wp_redirect( self_admin_url("plugin-editor.php?file=$file&a=te&scrollto=$scrollto$editor_mods") );
 		exit;
 	}
 
@@ -109,6 +117,8 @@ default:
 		}
 	}
 
+	wp_enqueue_script( 'wp-ace' );
+
 	get_current_screen()->add_help_tab( array(
 	'id'		=> 'overview',
 	'title'		=> __('Overview'),
@@ -218,15 +228,34 @@ foreach ( $plugin_files as $plugin_file ) :
 		// No extension found
 		continue;
 	}
+
+	$url = sprintf( 'plugin-editor.php?file=%s&amp;plugin=%s', urlencode( $plugin_file ), urlencode( $plugin ) );
+	if ( ! empty( $_GET['editor-theme'] ) )
+		$url .= '&amp;editor-theme=' . urlencode( $_GET['editor-theme'] );
+	if ( ! empty( $_GET['editor-mode'] ) )
+		$url .= '&amp;editor-mode=' . urlencode( $_GET['editor-mode'] );
 ?>
-		<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="plugin-editor.php?file=<?php echo urlencode( $plugin_file ) ?>&amp;plugin=<?php echo urlencode( $plugin ) ?>"><?php echo $plugin_file ?></a></li>
+		<li<?php echo $file == $plugin_file ? ' class="highlight"' : ''; ?>><a href="<?php echo $url ?>"><?php echo $plugin_file ?></a></li>
 <?php endforeach; ?>
 	</ul>
 </div>
+
+<?php include( ABSPATH . 'wp-admin/includes/code-editor.php' );  ?>
+
 <form name="template" id="template" action="plugin-editor.php" method="post">
 	<?php wp_nonce_field('edit-plugin_' . $file) ?>
-		<div><textarea cols="70" rows="25" name="newcontent" id="newcontent" aria-describedby="newcontent-description"><?php echo $content; ?></textarea>
+		<div id="wp-ace-editor" data-theme="<?php
+			if ( ! empty( $_GET['editor-theme'] ) )
+				echo $_GET['editor-theme'];
+		?>" data-mode="<?php echo $current_mode ?>"><?php echo $content; ?></div>
+		<textarea id="newcontent" name="newcontent"><?php echo $content; ?></textarea>
 		<input type="hidden" name="action" value="update" />
+		<?php if ( ! empty( $_GET['editor-theme'] ) ): ?>
+		<input type="hidden" name="editor-theme" value="<?php echo esc_attr( $_GET['editor-theme'] ) ?>" />
+		<?php endif ?>
+		<?php if ( ! empty( $_GET['editor-mode'] ) ): ?>
+		<input type="hidden" name="editor-mode" value="<?php echo esc_attr( $_GET['editor-mode'] ) ?>" />
+		<?php endif ?>
 		<input type="hidden" name="file" value="<?php echo esc_attr($file) ?>" />
 		<input type="hidden" name="plugin" value="<?php echo esc_attr($plugin) ?>" />
 		<input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
diff --git wp-admin/theme-editor.php wp-admin/theme-editor.php
index 2033a23..2277d5f 100644
--- wp-admin/theme-editor.php
+++ wp-admin/theme-editor.php
@@ -75,11 +75,19 @@ if ( empty( $file ) ) {
 validate_file_to_edit( $file, $allowed_files );
 $scrollto = isset( $_REQUEST['scrollto'] ) ? (int) $_REQUEST['scrollto'] : 0;
 
+$editor_mods = '';
+if ( ! empty( $_REQUEST['editor-theme'] ) || ! empty( $_REQUEST['editor-mode'] ) ) {
+	if ( ! empty( $_REQUEST['editor-theme'] ) )
+		$editor_mods .= '&editor-theme=' . $_REQUEST['editor-theme'];
+	if ( ! empty( $_REQUEST['editor-mode'] ) )
+		$editor_mods .= '&editor-mode=' . $_REQUEST['editor-mode'];
+}
+
 switch( $action ) {
 case 'update':
 	check_admin_referer( 'edit-theme_' . $file . $stylesheet );
 	$newcontent = wp_unslash( $_POST['newcontent'] );
-	$location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto;
+	$location = 'theme-editor.php?file=' . urlencode( $relative_file ) . '&theme=' . urlencode( $stylesheet ) . '&scrollto=' . $scrollto . $editor_mods;
 	if ( is_writeable( $file ) ) {
 		//is_writable() not always reliable, check return value. see comments @ http://uk.php.net/is_writable
 		$f = fopen( $file, 'w+' );
@@ -96,6 +104,8 @@ break;
 
 default:
 
+	wp_enqueue_script( 'wp-ace' );
+
 	require_once( ABSPATH . 'wp-admin/admin-header.php' );
 
 	update_recently_edited( $file );
@@ -186,8 +196,14 @@ if ( $allowed_files ) :
 
 		if ( $absolute_filename == $file )
 			$file_description = '<span class="highlight">' . $file_description . '</span>';
+
+		$url = sprintf( 'theme-editor.php?file=%s&amp;theme=%s', urlencode( $filename ), urlencode( $stylesheet ) );
+		if ( ! empty( $_GET['editor-theme'] ) )
+			$url .= '&amp;editor-theme=' . urlencode( $_GET['editor-theme'] );
+		if ( ! empty( $_GET['editor-mode'] ) )
+			$url .= '&amp;editor-mode=' . urlencode( $_GET['editor-mode'] );
 ?>
-		<li><a href="theme-editor.php?file=<?php echo urlencode( $filename ) ?>&amp;theme=<?php echo urlencode( $stylesheet ) ?>"><?php echo $file_description; ?></a></li>
+		<li><a href="<?php echo $url ?>"><?php echo $file_description; ?></a></li>
 <?php
 	endforeach;
 ?>
@@ -197,10 +213,23 @@ if ( $allowed_files ) :
 <?php if ( $error ) :
 	echo '<div class="error"><p>' . __('Oops, no such file exists! Double check the name and try again, merci.') . '</p></div>';
 else : ?>
+
+	<?php include( ABSPATH . 'wp-admin/includes/code-editor.php' ); ?>
+
 	<form name="template" id="template" action="theme-editor.php" method="post">
 	<?php wp_nonce_field( 'edit-theme_' . $file . $stylesheet ); ?>
-		<div><textarea cols="70" rows="30" name="newcontent" id="newcontent" aria-describedby="newcontent-description"><?php echo $content; ?></textarea>
+		<div id="wp-ace-editor" data-theme="<?php
+			if ( ! empty( $_GET['editor-theme'] ) )
+				echo $_GET['editor-theme'];
+		?>" data-mode="<?php echo $current_mode ?>"><?php echo $content; ?></div>
+		<textarea id="newcontent" name="newcontent"><?php echo $content; ?></textarea>
 		<input type="hidden" name="action" value="update" />
+		<?php if ( ! empty( $_GET['editor-theme'] ) ): ?>
+		<input type="hidden" name="editor-theme" value="<?php echo esc_attr( $_GET['editor-theme'] ) ?>" />
+		<?php endif ?>
+		<?php if ( ! empty( $_GET['editor-mode'] ) ): ?>
+		<input type="hidden" name="editor-mode" value="<?php echo esc_attr( $_GET['editor-mode'] ) ?>" />
+		<?php endif ?>
 		<input type="hidden" name="file" value="<?php echo esc_attr( $relative_file ); ?>" />
 		<input type="hidden" name="theme" value="<?php echo esc_attr( $theme->get_stylesheet() ); ?>" />
 		<input type="hidden" name="scrollto" id="scrollto" value="<?php echo $scrollto; ?>" />
diff --git wp-includes/script-loader.php wp-includes/script-loader.php
index cfb865e..26637bc 100644
--- wp-includes/script-loader.php
+++ wp-includes/script-loader.php
@@ -197,6 +197,8 @@ function wp_default_scripts( &$scripts ) {
 			'loadingAnimation' => includes_url('js/thickbox/loadingAnimation.gif'),
 			'closeImage' => includes_url('js/thickbox/tb-close.png')
 	) );
+	$scripts->add( 'ace', "/wp-includes/js/ace/ace.js", array('jquery'), '1.0.0' );
+	$scripts->add( 'wp-ace', "/wp-includes/js/wp-ace.js", array('ace'), '1.0.0' );
 
 	$scripts->add( 'jcrop', "/wp-includes/js/jcrop/jquery.Jcrop.min.js", array('jquery'), '0.9.10');
 
